From 240d101539e58b02124e680ca4c47b24d4499266 Mon Sep 17 00:00:00 2001 From: Michael Krotscheck Date: Mon, 1 Jun 2015 11:34:33 -0700 Subject: [PATCH] Added PhantomJS test execution This patch adds test execution in the headless phantomjs runner, a feature requested by package maintainers during the summit (for all javascript projects, not refstack explicitly). The phantomjs requirement has been explicitly added, as at this point there are several upstream changes pending inside of npm that would make this build brittle. 1- NPMv3 will no longer automatically install peerDependencies. 2- karma-phantomjs-launcher will soon gracefully degrade to a system-installed phantomjs if it is not otherwise available. Once both of these land we can remove the explicit reference to PhantomJS. Change-Id: I054792c23e1f38538800c901605a032118184925 --- package.json | 2 ++ refstack-ui/tests/karma.conf.js | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index b363dc87..ba9c13d6 100644 --- a/package.json +++ b/package.json @@ -13,6 +13,8 @@ "karma-cli": "0.0.4", "karma-firefox-launcher": "^0.1.3", "karma-jasmine": "^0.2.2", + "karma-phantomjs-launcher": "0.2.0", + "phantomjs": "1.9.17", "protractor": "~1.0.0", "shelljs": "^0.2.6", "tmp": "0.0.23" diff --git a/refstack-ui/tests/karma.conf.js b/refstack-ui/tests/karma.conf.js index 4bf63dc6..8a8efdc9 100644 --- a/refstack-ui/tests/karma.conf.js +++ b/refstack-ui/tests/karma.conf.js @@ -29,11 +29,12 @@ module.exports = function (config) { frameworks: ['jasmine'], - browsers: ['Firefox'], + browsers: ['Firefox', 'PhantomJS'], plugins: [ 'karma-chrome-launcher', 'karma-firefox-launcher', + 'karma-phantomjs-launcher', 'karma-jasmine' ],