Fix bug in PipeParser

This commit is contained in:
Kim Biesbjerg
2017-01-13 09:34:34 +01:00
parent 7822916e28
commit fcd37fd000
3 changed files with 8 additions and 2 deletions

View File

@@ -12,6 +12,12 @@ describe('PipeParser', () => {
parser = new PipeParser();
});
it('should only extract string using pipe', () => {
const contents = `<button [style.background]="'lime'">{{ 'SomeKey_NotWorking' | translate }}</button>`;
const keys = parser.extract(contents, templateFilename).keys();
expect(keys).to.deep.equal(['SomeKey_NotWorking']);
});
it('should extract interpolated strings using translate pipe', () => {
const contents = `Hello {{ 'World' | translate }}`;
const keys = parser.extract(contents, templateFilename).keys();