test(HtmlLexer): Add test for "{" and "{{" escaping

This commit is contained in:
Victor Berchet 2016-06-30 11:00:12 -07:00
parent 60e6f91a53
commit 6c86e8d80a
1 changed files with 16 additions and 0 deletions

View File

@ -507,6 +507,22 @@ export function main() {
[HtmlTokenType.EOF], [HtmlTokenType.EOF],
]); ]);
}); });
it('should be able to escape {', () => {
expect(tokenizeAndHumanizeParts('{{ "{" }}')).toEqual([
[HtmlTokenType.TEXT, '{{ "{" }}'],
[HtmlTokenType.EOF],
]);
});
it('should be able to escape {{', () => {
expect(tokenizeAndHumanizeParts('{{ "{{" }}')).toEqual([
[HtmlTokenType.TEXT, '{{ "{{" }}'],
[HtmlTokenType.EOF],
]);
});
}); });
describe('raw text', () => { describe('raw text', () => {