fix tests

This commit is contained in:
Kim Biesbjerg 2019-07-17 13:00:29 +02:00
parent ceb4be7e3d
commit 71cc6e6883
2 changed files with 7 additions and 7 deletions

View File

@ -15,13 +15,13 @@ describe('FunctionParser', () => {
it('should extract strings using marker function', () => {
const contents = `
import { _ } from '@biesbjerg/ngx-translate-extract';
_('Hello world');
_(['I', 'am', 'extracted']);
import { marker } from '@biesbjerg/ngx-translate-extract-marker';
marker('Hello world');
marker(['I', 'am', 'extracted']);
otherFunction('But I am not');
_(message || 'binary expression');
_(message ? message : 'conditional operator');
_('FOO.bar');
marker(message || 'binary expression');
marker(message ? message : 'conditional operator');
marker('FOO.bar');
`;
const keys = parser.extract(contents, componentFilename).keys();
expect(keys).to.deep.equal(['Hello world', 'I', 'am', 'extracted', 'binary expression', 'conditional operator', 'FOO.bar']);

View File

@ -207,7 +207,7 @@ describe('ServiceParser', () => {
export class AppComponent {
public constructor(protected translateService: TranslateService) { }
public test() {
this.translateService.get(["yes", variable ]).then(translations => {
this.translateService.get(["yes", variable]).then(translations => {
console.log(translations[variable]);
});
}