forked from BoldGrid/post-and-page-builder
-
Notifications
You must be signed in to change notification settings - Fork 0
/
karma.config.js
54 lines (43 loc) · 1.47 KB
/
karma.config.js
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
// Currently using https://github.com/istanbuljs/babel-plugin-istanbul,
// Switch to: https://github.com/webpack-contrib/istanbul-instrumenter-loader
module.exports = function( config ) {
config.set( {
frameworks: [ 'jasmine', 'es6-shim' ],
reporters: [ 'spec', 'coverage' ],
browsers: [ 'PhantomJS' ],
colors: true,
// ... normal karma configuration
files: [
'node_modules/babel-polyfill/dist/polyfill.js',
'https://code.jquery.com/jquery-1.12.4.min.js',
'https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.8.3/underscore-min.js',
'https://code.jquery.com/ui/1.12.1/jquery-ui.min.js',
// All files ending in "_test"
// { pattern: 'test/*_test.js', watched: false }
{ pattern: 'tests/**/*_test.js', watched: false }
// Each file acts as entry point for the webpack configuration
],
preprocessors: {
// Add webpack as preprocessor
'tests/*_test.js': [ 'webpack', 'sourcemap' ],
'tests/**/*_test.js': [ 'webpack', 'sourcemap' ]
},
// Optionally, configure the reporter
coverageReporter: {
type: 'html',
dir: 'coverage/',
reporters: [
// Reporters not supporting the `file` property
{ type: 'html', subdir: 'report-html' },
{ type: 'lcovonly', subdir: '.', file: 'report-lcovonly.txt' },
{ type: 'lcov', subdir: 'report-lcov' }
]
},
webpack: require( './tools/config/webpack.test.js' ),
webpackMiddleware: {
// Webpack-dev-middleware configuration
// i. e.
stats: 'errors-only'
}
} );
};