Karma Jasmine PhantomJS-PhantomJS not captured in 60,000 ms

In the JSON package, I tried many different versions of the karma phantoms-launcher, phantomjs, including phantomjs-prebuilt.

Current JSON package "devDependencies": {"jasmine core": "^ 2.5.2", "karma": "^ 1.6.0", "karma-jasmine": "^ 1.1.0", "karma-phantom- launcher ":" ^ 0,1,1 "," phantoms ":" ^ 1.9.20 "}

In all cases, I get "PhantomJS not captured in 60,000 ms." He tries twice, then surrenders.

I am on Windows 10 working from the command line in WebStorm. However, I get the same errors in Visual Studio code.

What is the problem? Karma begins, Karma finds files, launches PhantomJS, but does not commit.

I saw suggestions for setting localhost in the hosts file and checking if karma port 9876 is being used. Nothing seems to work.

Please inform. Thanks

+4
source share
1 answer

From this topic https://github.com/karma-runner/karma-phantomjs-launcher/issues/84

Go to C:\Windows\System32\drivers\etc\hostsor /etc/hosts(if you are on Linux)

Add 127.0.0.1 localhosta host to your file and it works!

+1
source

Source: https://habr.com/ru/post/1674158/


All Articles