phantomjs unit testing #700

Closed
opened 2025-08-09 17:17:19 +00:00 by fergalmoran · 0 comments
Owner

Originally created by @petrce on 5/31/2017

hey guys did anyone managed to make phantomJs testing working?

I added karma-phantomjs
npm i karma-phantomjs-launcher --save-dev
and set browser to PhantomJS in karma.conf:
browsers: ['PhantomJS'],
I always get this error:

PhantomJS 2.1.1 (Windows 7 0.0.0) ERROR
  SyntaxError: Unexpected token '>'
  at boot-tests.ts:22607

I guess it is because PhantomJS requires es5 ONLY. Chrome works fine.
I am including some ES2015 .js files directly in my typescript code... do I need to recompile them somehow to es5? tsconfig.json is already set to "target": "es5",

*Originally created by @petrce on 5/31/2017* hey guys did anyone managed to make phantomJs testing working? I added karma-phantomjs `npm i karma-phantomjs-launcher --save-dev` and set browser to PhantomJS in karma.conf: `browsers: ['PhantomJS'],` I always get this error: ``` PhantomJS 2.1.1 (Windows 7 0.0.0) ERROR SyntaxError: Unexpected token '>' at boot-tests.ts:22607 ``` I guess it is because PhantomJS requires es5 ONLY. Chrome works fine. I am including some ES2015 .js files directly in my typescript code... do I need to recompile them somehow to es5? tsconfig.json is already set to `"target": "es5",`
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/JavaScriptServices#700
No description provided.