Add test for ignoring calculated values. Closes #128

This commit is contained in:
Kim Biesbjerg 2020-03-22 10:43:08 +01:00
parent 6ed962fa6e
commit 13f46a524f
2 changed files with 7 additions and 0 deletions

1
tests/app/login.html Normal file
View File

@ -0,0 +1 @@
{{ 'SOURCES.' + source.name + '.NAME_PLURAL' | translate }}

View File

@ -147,4 +147,10 @@ describe('PipeParser', () => {
const keys = parser.extract(contents, templateFilename).keys();
expect(keys).to.deep.equal(['message']);
});
it('should ignore calculated values', () => {
const contents = `{{ 'SOURCES.' + source.name + '.NAME_PLURAL' | translate }}`;
const keys = parser.extract(contents, templateFilename).keys();
expect(keys).to.deep.equal([]);
});
});