mirror of
https://github.com/nasa/openmct.git
synced 2025-01-18 02:39:56 +00:00
[Test] Use PhantomJS to run tests
Switch Karma to use PhantomJS to run tests. CI machines no longer need to have Chrome installed. Implemented after changes to build process due to imperative registration. https://github.com/nasa/openmctweb/issues/450
This commit is contained in:
parent
6fc028e112
commit
db7560c31f
@ -71,7 +71,7 @@ module.exports = function(config) {
|
||||
// Specify browsers to run tests in.
|
||||
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
|
||||
browsers: [
|
||||
'Chrome'
|
||||
'PhantomJS'
|
||||
],
|
||||
|
||||
// Code coverage reporting.
|
||||
|
@ -17,12 +17,13 @@
|
||||
"karma-coverage": "^0.5.3",
|
||||
"karma-html-reporter": "^0.2.7",
|
||||
"karma-jasmine": "^0.1.5",
|
||||
"karma-phantomjs-launcher": "^0.1.4",
|
||||
"karma-phantomjs-launcher": "^0.2.3",
|
||||
"karma-requirejs": "^0.2.2",
|
||||
"lodash": "^3.10.1",
|
||||
"markdown-toc": "^0.11.7",
|
||||
"marked": "^0.3.5",
|
||||
"mkdirp": "^0.5.1",
|
||||
"phantomjs": "^1.9.19",
|
||||
"requirejs": "^2.1.17",
|
||||
"split": "^1.0.0"
|
||||
},
|
||||
|
10
test-main.js
10
test-main.js
@ -51,5 +51,13 @@ require.config({
|
||||
deps: allTestFiles,
|
||||
|
||||
// we have to kickoff jasmine, as it is asynchronous
|
||||
callback: window.__karma__.start
|
||||
callback: function () {
|
||||
var args = [].slice.apply(arguments);
|
||||
require(['es6-promise'], function (es6Promise) {
|
||||
if (!window.Promise) {
|
||||
window.Promise = es6Promise.Promise;
|
||||
}
|
||||
window.__karma__.start.apply(window.__karma__, args);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user