942f6a9add
Downgrades karma-coverages, uses phantomJS to run unit test, and finally adds gulp unit as the test runner. Karma was having issues with Chrome+Browserify. Unit tests still do not run since the example services were removed. Change-Id: I8973a1e12b0b2af992bea5da552aae0736dcdf9c
52 lines
925 B
JavaScript
52 lines
925 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', 'babel', 'coverage']
|
|
},
|
|
browsers: ['PhantomJS'],
|
|
reporters: ['progress', 'coverage'],
|
|
|
|
autoWatch: true,
|
|
singleRun: true,
|
|
|
|
browserify: {
|
|
debug: true,
|
|
transform: [
|
|
'bulkify',
|
|
istanbul({
|
|
instrumenter: isparta,
|
|
ignore: ['**/node_modules/**', '**/test/**']
|
|
})
|
|
]
|
|
},
|
|
|
|
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'
|
|
]
|
|
|
|
});
|
|
|
|
};
|