Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Revert "test(compiler): add a test for parsing multiline expressions …
…in attributes (#42062)"

This reverts commit fe12651.
  • Loading branch information
atscott committed Aug 3, 2021
commit f3a88b81d1bd648b076b067cef29bed1e9e426e8
27 changes: 0 additions & 27 deletions packages/compiler/test/ml_parser/html_parser_spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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', () => {
expect(humanizeDom(parser.parse('<div foo="&amp;"></div>', 'TestComp'))).toEqual([
[html.Element, 'div', 0],
Expand Down
21 changes: 0 additions & 21 deletions packages/compiler/test/ml_parser/lexer_spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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', () => {
expect(tokenizeAndHumanizeParts('<t a="">')).toEqual([
[TokenType.TAG_OPEN_START, '', 't'],
Expand Down