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
2. Install phantomjs and phantomjs launcher
$ npm install --save-dev phantomjs$ npm install --save-dev karma-phantomjs-launcher
3. Change karma.conf.js
// First change
require('karma-chrome-launcher') => require('karma-phantomjs-launcher')
// Second change
browsers: ['Chrome'] => browsers: ['PhantomJS']
4. Install Quickstart App
$ npm install
5. Run tests
$ npm run test-once
The following error is reported:
PhantomJS 2.1.1 (Linux 0.0.0) ERROR TypeError: undefined is not a function (evaluating 'System.config') at karma-test-shim.js:30
What am I missing or doing wrong?
Thanks.