Tests about support of HTML tags in translations keys with GetText (#172)

- Verify that html tags are supported in translation keys
- Add typed support of gettext-parser
This commit is contained in:
Lorent Lempereur
2020-04-01 12:19:30 +02:00
committed by GitHub
parent 73f39d625c
commit 71f4f42b33
8 changed files with 63 additions and 8 deletions

View File

@@ -36,6 +36,12 @@ describe('DirectiveParser', () => {
expect(keys).to.deep.equal(['Hello <strong translate>World</strong>']);
});
it('should not exclude html tags in children', () => {
const contents = `<div translate>Hello <strong>World</strong></div>`;
const keys = parser.extract(contents, templateFilename).keys();
expect(keys).to.deep.equal(['Hello <strong>World</strong>']);
});
it('should extract and parse inline template', () => {
const contents = `
@Component({