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']); | ||||||
|   | |||||||
| @@ -207,7 +207,7 @@ describe('ServiceParser', () => { | |||||||
| 			export class AppComponent { | 			export class AppComponent { | ||||||
| 				public constructor(protected translateService: TranslateService) { } | 				public constructor(protected translateService: TranslateService) { } | ||||||
| 				public test() { | 				public test() { | ||||||
| 					this.translateService.get(["yes", variable ]).then(translations => { | 					this.translateService.get(["yes", variable]).then(translations => { | ||||||
| 						console.log(translations[variable]); | 						console.log(translations[variable]); | ||||||
| 					}); | 					}); | ||||||
| 				} | 				} | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user