PhantomJS does not work with Karma in Angular2 project

后端 未结 3 1370
灰色年华
灰色年华 2021-01-18 01:27

I have created an out-of-the box project with the angular cli (1.0.0-rc1.0.0). Then I installed the PhantomJS plugin (npm install karma-phantonjs-launcher). Reprodu

3条回答
  •  [愿得一人]
    2021-01-18 02:08

    Since Chrome supports now (as of version 59) headless running, there's no reason any more to use outdated PhantomJS. Unless you cannot update/install chrome on target machine. If you have included karma-chrome-launcher in karma.conf you can now just specify:

    browsers: ['ChromeHeadless']
    

    There's also possibility to use the Canary edition via ChromeCanary or ChromeCanaryHeadless.

提交回复
热议问题