Revert "test(compiler): add a test for parsing multiline expressions in attributes (#42062)" (#43033)
This reverts commit fe12651580
.
PR Close #43033
This commit is contained in:
parent
f0c5ba08f6
commit
f85b5f9dbd
|
@ -274,33 +274,6 @@ import {humanizeDom, humanizeDomSourceSpans, humanizeLineColumn, humanizeNodes}
|
||||||
]);
|
]);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should parse attributes containing unquoted interpolation', () => {
|
|
||||||
expect(humanizeDom(parser.parse('<div foo={{message}}></div>', 'TestComp'))).toEqual([
|
|
||||||
[html.Element, 'div', 0],
|
|
||||||
[html.Attribute, 'foo', '{{message}}', [''], ['{{', 'message', '}}'], ['']]
|
|
||||||
]);
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should parse bound inputs with expressions containing newlines', () => {
|
|
||||||
expect(humanizeDom(parser.parse(
|
|
||||||
`<app-component
|
|
||||||
[attr]="[
|
|
||||||
{text: 'some text',url:'//www.google.com'},
|
|
||||||
{text:'other text',url:'//www.google.com'}]"></app-component>`,
|
|
||||||
'TestComp')))
|
|
||||||
.toEqual([
|
|
||||||
[html.Element, 'app-component', 0],
|
|
||||||
[
|
|
||||||
html.Attribute, '[attr]', `[
|
|
||||||
{text: 'some text',url:'//www.google.com'},
|
|
||||||
{text:'other text',url:'//www.google.com'}]`,
|
|
||||||
[`[
|
|
||||||
{text: 'some text',url:'//www.google.com'},
|
|
||||||
{text:'other text',url:'//www.google.com'}]`]
|
|
||||||
],
|
|
||||||
]);
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should parse attributes containing encoded entities', () => {
|
it('should parse attributes containing encoded entities', () => {
|
||||||
expect(humanizeDom(parser.parse('<div foo="&"></div>', 'TestComp'))).toEqual([
|
expect(humanizeDom(parser.parse('<div foo="&"></div>', 'TestComp'))).toEqual([
|
||||||
[html.Element, 'div', 0],
|
[html.Element, 'div', 0],
|
||||||
|
|
|
@ -407,27 +407,6 @@ import {ParseLocation, ParseSourceFile, ParseSourceSpan} from '../../src/parse_u
|
||||||
]);
|
]);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should parse bound inputs with expressions containing newlines', () => {
|
|
||||||
expect(tokenizeAndHumanizeParts(`<app-component
|
|
||||||
[attr]="[
|
|
||||||
{text: 'some text',url:'//www.google.com'},
|
|
||||||
{text:'other text',url:'//www.google.com'}]">`))
|
|
||||||
.toEqual([
|
|
||||||
[TokenType.TAG_OPEN_START, '', 'app-component'],
|
|
||||||
[TokenType.ATTR_NAME, '', '[attr]'],
|
|
||||||
[TokenType.ATTR_QUOTE, '"'],
|
|
||||||
[
|
|
||||||
TokenType.ATTR_VALUE_TEXT,
|
|
||||||
'[\n' +
|
|
||||||
' {text: \'some text\',url:\'//www.google.com\'},\n' +
|
|
||||||
' {text:\'other text\',url:\'//www.google.com\'}]'
|
|
||||||
],
|
|
||||||
[TokenType.ATTR_QUOTE, '"'],
|
|
||||||
[TokenType.TAG_OPEN_END],
|
|
||||||
[TokenType.EOF],
|
|
||||||
]);
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should parse attributes with empty quoted value', () => {
|
it('should parse attributes with empty quoted value', () => {
|
||||||
expect(tokenizeAndHumanizeParts('<t a="">')).toEqual([
|
expect(tokenizeAndHumanizeParts('<t a="">')).toEqual([
|
||||||
[TokenType.TAG_OPEN_START, '', 't'],
|
[TokenType.TAG_OPEN_START, '', 't'],
|
||||||
|
|
Loading…
Reference in New Issue