In the project that I'm working on, we use the Karma test runner, and karma-phantomjs-launcher to help us run tests using PhantomJS. Recently, we have discovered that the PhantomJS version that gets pulled down as a dependency to karma-phantomjs-launcher 1.9.8
has some issues that were making our tests fail. Fortunately, karma-phantomjs-launcher allows us to set the PHANTOMJS_BIN
environment variable to point to an alternative PhantomJS binary to use instead, which made upgrading to 2.0.0
rather simple.
This is all fine and dandy, but when our continuous integration environment attempts to build our project, it is still pulling down the PhantomJS 1.9.8
binary when doing an npm install
, since it needs to install karma-phantomjs-launcher
which depends on PhantomJS 1.9.8
.
Since our build server has been configured to use the 2.0.0
binary that we've given it, there really is no need to download the 1.9.8
binary, and I would prefer that it did not do that if possible.
So is there any way that I could configure my package.json to tell karma-phantomjs-launcher
that it does not need to pull down its PhantomJS 1.9.8
dependency?