-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathkarma.conf.js
More file actions
39 lines (35 loc) · 1.22 KB
/
karma.conf.js
File metadata and controls
39 lines (35 loc) · 1.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
'use strict';
const filePath = process.cwd() + '/.rgui-cache/test/index.js';
const reportsPath = process.cwd() + '/test-reports';
const preprocessors = {};
preprocessors[filePath] = 'webpack';
const webpackConfig = require('./webpack.conf.js')({
output: { libraryTarget: 'umd' },
});
webpackConfig.module.loaders.push({ test: /\.js$/, exclude: /(test|node_modules)[\\\/]/, loader: require.resolve('isparta-loader') });
module.exports = function (config) {
config.set({
singleRun: true,
browsers: ['PhantomJS'], // 'Chrome', 'Firefox', 'IE', 'IE9', 'IE8'
frameworks: ['mocha', 'expect'],
files: [
'./node_modules/babel-polyfill/dist/polyfill.min.js',
'./node_modules/regularjs/dist/regular.min.js',
filePath,
],
preprocessors,
webpack: webpackConfig,
webpackMiddleware: { noInfo: true },
reporters: ['nyan', 'coverage'],
coverageReporter: {
dir: `${reportsPath}/coverage`,
reporters: [
{ type: 'lcov', subdir: '.' },
{ type: 'text' },
],
},
// htmlReporter: {
// outputDir: `${reportsPath}/result`
// }
});
};