-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkarma.conf.js
41 lines (38 loc) · 1.14 KB
/
karma.conf.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
// this allows us to re-use the important bit from the webpack config
// and avoids duplication in the webpack section of the karma config
var webpackConfig = require('./webpack.config');
// BUT: we need to switch to inline source maps and remove the entry object
// to make karma happy
webpackConfig.devtool = 'inline-source-map';
webpackConfig.entry = {};
// this points karma to the test.bundle.js file only
// that file pulls in all of the .spec.js files and uses our
// existing webpack rules to build a test bundle.
//
// had to add chrome_without_security
// https://www.mail-archive.com/[email protected]/msg02449.html
// Wow!
module.exports = function(config) {
config.set({
//browsers: ['Chrome'],
browsers: ['chrome_without_security'],
customLaunchers: {
chrome_without_security: {
base: 'Chrome',
flags: ['--disable-web-security']
}
},
frameworks: ['jasmine'],
reporters: ['dots'],
files: [
'test.bundle.js'
],
preprocessors: {
'test.bundle.js': ['webpack','sourcemap']
},
webpack: webpackConfig,
webpackMiddleware: {
noInfo: true
}
});
}