stackviz/test/karma.conf.js
Tim Buckley 5c37303ca3 Add karma-subunit-reporter
This adds a new karma plugin, 'karma-subunit-reporter', to generate
subunit streams for unit test output. These files should be compatible
with stackviz itself (via stackviz-export) and other tools like
subunit2sql and openstack-health.

Change-Id: I8ee5425e1688fa090d5dc9fe3021345e779e2c07
2016-06-10 10:06:39 -06:00

57 lines
985 B
JavaScript

'use strict';
var istanbul = require('browserify-istanbul');
var isparta = require('isparta');
module.exports = function(config) {
config.set({
basePath: '../',
frameworks: ['jasmine', 'browserify'],
preprocessors: {
'app/js/**/*.js': ['browserify', 'coverage']
},
browsers: ['Chrome'],
reporters: ['progress', 'subunit'],
autoWatch: true,
singleRun: true,
browserify: {
debug: true,
transform: [
'bulkify',
istanbul({
instrumenter: isparta,
ignore: ['**/node_modules/**', '**/test/**']
})
]
},
subunitReporter: {
slug: true,
tags: ['worker-0']
},
proxies: {
'/': 'http://localhost:9876/'
},
urlRoot: '/__karma__/',
files: [
// app-specific code
'app/js/main.js',
// 3rd-party resources
'node_modules/angular-mocks/angular-mocks.js',
// test files
'test/unit/**/*.js'
]
});
};