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