Skip to content

Running test using PhantomJS is failing with RC.0 #5065

Closed
@daBishMan

Description

@daBishMan

Please provide us with the following information:

OS?

Windows 10.

Versions.

Please run ng --version. If there's nothing outputted, please run in a Terminal: node --version and paste the result here:

@angular/cli: 1.0.0-rc.0
node: 7.5.0
os: win32 x64
@angular/common: 2.4.8
@angular/compiler: 2.4.8
@angular/core: 2.4.8
@angular/forms: 2.4.8
@angular/http: 2.4.8
@angular/platform-browser: 2.4.8
@angular/platform-browser-dynamic: 2.4.8
@angular/router: 3.4.8
@angular/cli: 1.0.0-rc.0
@angular/compiler-cli: 2.4.8

Repro steps.

Was this an app that wasn't created using the CLI? What change did you do on your code? etc.
Running tests using PhantomJS fails, while running the same tests using Chrome passes.

$ ng test -browsers PhantomJS
27 02 2017 09:16:38.148:WARN [karma]: No captured browser, open http://localhost:9876/
27 02 2017 09:16:38.158:INFO [karma]: Karma v1.4.1 server started at http://0.0.0.0:9876/
27 02 2017 09:16:38.158:INFO [launcher]: Launching browser PhantomJS with unlimited concurrency
27 02 2017 09:16:38.614:INFO [launcher]: Starting browser PhantomJS
27 02 2017 09:16:42.636:INFO [PhantomJS 2.1.1 (Windows 8 0.0.0)]: Connected on socket FxslPlobVmqXyCu-AAAA with id 90654741
PhantomJS 2.1.1 (Windows 8 0.0.0) ERROR
SyntaxError: Use of reserved word 'class'
at webpack:///src/app/shared/models/search-params.model.ts:4:0 <- src/test.ts:6252
PhantomJS 2.1.1 (Windows 8 0.0.0) ERROR
SyntaxError: Use of reserved word 'class'
at webpack:///src/app/shared/models/search-params.model.ts:4:0 <- src/test.ts:6252

PhantomJS 2.1.1 (Windows 8 0.0.0): Executed 0 of 0 ERROR (0.862 secs / 0 secs)

Chrome 56.0.2924 (Windows 10 0.0.0): Executed 291 of 291 SUCCESS (10.092 secs / 9.985 secs)
TOTAL: 291 SUCCESS

The log given by the failure.

Normally this include a stack trace and some more information.
$ ng test -browsers PhantomJS
27 02 2017 09:16:38.148:WARN [karma]: No captured browser, open http://localhost:9876/
27 02 2017 09:16:38.158:INFO [karma]: Karma v1.4.1 server started at http://0.0.0.0:9876/
27 02 2017 09:16:38.158:INFO [launcher]: Launching browser PhantomJS with unlimited concurrency
27 02 2017 09:16:38.614:INFO [launcher]: Starting browser PhantomJS
27 02 2017 09:16:42.636:INFO [PhantomJS 2.1.1 (Windows 8 0.0.0)]: Connected on socket FxslPlobVmqXyCu-AAAA with id 90654741
PhantomJS 2.1.1 (Windows 8 0.0.0) ERROR
SyntaxError: Use of reserved word 'class'
at webpack:///src/app/shared/models/search-params.model.ts:4:0 <- src/test.ts:6252
PhantomJS 2.1.1 (Windows 8 0.0.0) ERROR
SyntaxError: Use of reserved word 'class'
at webpack:///src/app/shared/models/search-params.model.ts:4:0 <- src/test.ts:6252

Mention any other details that might be useful.

This only happens if you are running using PhantomJS


Thanks! We'll be in touch soon.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions