Npm karma phantomJS undefined is not a constructor

When running tests for an action-redux application with karma, all of them passed with webkit, but with an error with phantomJS with the following error:

TypeError: undefined is not a constructor (evaluating 'Object.assign({} [...]

This will also cause the test runner to crash.

+7
npm reactjs redux phantomjs karma-runner
source share
1 answer

Installing and setting up a phantomjs polyfill destination object fixes the problem.

See https://www.npmjs.com/package/phantomjs-polyfill-object-assign

+14
source share

All Articles