fix tests
This commit is contained in:
@@ -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']);
|
||||||
|
|||||||
Reference in New Issue
Block a user