@segment/load-script
Version:
Dynamically and asynchronously load a script file.
49 lines (39 loc) • 807 B
JavaScript
;
module.exports = function(config) {
var baseConfig = {
files: [
'test/index.js'
],
browsers: ['PhantomJS'],
frameworks: ['browserify', 'mocha'],
reporters: ['spec', 'coverage'],
preprocessors: {
'index.js': 'browserify',
'test/**/*.js': 'browserify'
},
browserify: {
debug: true,
transform: [
[
'browserify-istanbul',
{
instrumenterConfig: {
embedSource: true
}
}
]
]
},
coverageReporter: {
reporters: [
{ type: 'text' },
{ type: 'html' },
{ type: 'json' }
]
}
};
if (process.env.CI) {
Object.assign(baseConfig, require('./karma.conf.ci'));
}
config.set(baseConfig);
};