I am trying to figure out how to run the tests of Angular2 Quickstart with phantomjs.
I thought these steps were enough to configure Karma:
1. Clone the repository
$ git clone https://github.com/angular/quickstart.git
$ cd quickstart
$ npm install --save-dev phantomjs
$ npm install --save-dev karma-phantomjs-launcher
$ npm install
$ npm run test-once
PhantomJS 2.1.1 (Linux 0.0.0) ERROR
TypeError: undefined is not a function (evaluating 'System.config')
There's an error before that one: a 404 trying to find the
If you add that to the karma config, the error will go away.
files: [ // System.js for module loading 'node_modules/systemjs/dist/system.src.js', 'node_modules/systemjs/dist/system-polyfills.js',
Not quite sure what the difference is (why it's not needed for Chrome). I'm guessing this issue is yours. You should ask them.