Closed mikeerickson closed 8 years ago
Afaik the solution for this was to update two packages in the package.json:
"karma": "v0.13.19", "karma-phantomjs2-launcher": "v0.5.0", "phantomjs-prebuilt": "v2.1.4"
Hope this helps.
What is your opinion @wardbell,thx.
@attilacsanyi Thanks for offer, but still doesnt work. Are you using phantom globally?
21 02 2016 11:40:36.518:WARN [launcher]: Can not load "PhantomJS", it is not registered!
Perhaps you are missing some plugin?
Also, I am to assume I should (and did) remove
"karma-phantomjs-launcher": "^0.2.1",
$ npm i -D phantomjs-prebuilt@2.1.4
or
$ npm i -g phantomjs-prebuilt@2.1.4
@attilacsanyi Ah, pilot error.
Also had to make this change in karma.conf.js
browsers: ['Chrome','PhantomJS'],
to
browsers: ['Chrome','PhantomJS2'], // had to change to PhantomJS2
Whoops, I forgot to close this ticket....
@attilacsanyi Thanks again for your assistance.
Yes forgot to mention karma config with PantomJS2. I used dev dependencies only. Good to see its working for you. Yor welcome.
this still isn't working for me done all of the above and still get the same error. { "name": "movie-app", "version": "1.0.0", "description": "learning unit tsting", "main": "index.js", "scripts": { "test": "node_modules/karma/bin/karma start karma.conf.js" }, "author": "", "license": "ISC", "devDependencies": { "jasmine": "^2.4.1", "karma": "^0.13.22", "karma-chrome-launcher": "^0.2.3", "karma-firefox-launcher": "^0.1.7", "karma-jasmine": "^0.3.8", "karma-phantomjs2-launcher": "v0.5.0", "phantomjs-prebuilt": "^2.1.4" }, "dependencies": { "angular": "^1.5.5", "angular-mocks": "^1.5.5" } }
So, the following section of code is failing when using PhantomJS (with Karma) works fine with Chrome
I know all is loaded correctly (through karma.config.js) as the Chrome browser option is working just fine
The error in console is...