refstack/refstack-ui/tests/karma.conf.js
Michael Krotscheck 240d101539 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
2015-06-05 08:12:59 -07:00

48 lines
1.2 KiB
JavaScript

module.exports = function (config) {
'use strict';
config.set({
basePath: '../',
files: [
// Angular libraries.
'app/assets/lib/angular/angular.js',
'app/assets/lib/angular-ui-router/release/angular-ui-router.js',
'app/assets/lib/angular-bootstrap/ui-bootstrap.min.js',
'app/assets/lib/angular-mocks/angular-mocks.js',
'app/assets/lib/angular-bootstrap/ui-bootstrap-tpls.min.js',
'app/assets/lib/angular-busy/dist/angular-busy.min.js',
// JS files.
'app/app.js',
'app/components/**/*.js',
'app/shared/*.js',
'app/shared/**/*.js',
'app/assets/js/*.js',
// Test Specs.
'tests/unit/*.js'
],
autoWatch: true,
frameworks: ['jasmine'],
browsers: ['Firefox', 'PhantomJS'],
plugins: [
'karma-chrome-launcher',
'karma-firefox-launcher',
'karma-phantomjs-launcher',
'karma-jasmine'
],
junitReporter: {
outputFile: 'test_out/unit.xml',
suite: 'unit'
}
});
};