fix tests
This commit is contained in:
parent
ceb4be7e3d
commit
71cc6e6883
@ -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']);
|
||||
|
@ -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]);
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user