-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkarma.conf-base.js
30 lines (29 loc) · 964 Bytes
/
karma.conf-base.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
var path = require('path')
var webpack = require('./webpack.config')
module.exports = {
basePath: '',
singleRun: true, //just run once by default
frameworks: [ 'mocha' ], //use the mocha test framework
plugins: [
require('karma-webpack'),
require('karma-mocha'),
// require('karma-phantomjs-launcher'), // One can install this locally, if one so desires to speed things up
require('karma-sourcemap-loader'),
require('karma-mocha-reporter')
],
files: [
'tests.webpack.js'
],
preprocessors: {
'tests.webpack.js': [ 'webpack', 'sourcemap' ], //preprocess with webpack and our sourcemap loader
},
reporters: [ 'mocha' ],
webpack: { //kind of a copy of your webpack config
devtool: 'inline-source-map', //just do inline source maps instead of the default
module: webpack.module,
resolve: webpack.resolve
},
webpackServer: {
noInfo: true //please don't spam the console when running in karma!
}
}