Add experimental AstServiceParser

This commit is contained in:
Kim Biesbjerg
2017-01-28 15:22:08 +01:00
parent 303fb1b6de
commit 1c3915ff43
6 changed files with 349 additions and 5 deletions

View File

@@ -137,4 +137,19 @@ describe('ServiceParser', () => {
expect(keys).to.deep.equal([]);
});
// FAILS (Use AstServiceParser)
/*it('should extract string with params on same line', () => {
const contents = `
@Component({ })
export class AppComponent {
public constructor(protected _translateService: TranslateService) { }
public test() {
this._translateService.get('You are expected at {{time}}', {time: moment.format('H:mm')});
}
}
`;
const keys = parser.extract(contents, componentFilename).keys();
expect(keys).to.deep.equal(['You are expected at {{time}}']);
});*/
});