-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathkarma.shared.conf.js
More file actions
95 lines (85 loc) · 2.8 KB
/
karma.shared.conf.js
File metadata and controls
95 lines (85 loc) · 2.8 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
var webpack = require('webpack');
module.exports = function (config) {
return {
/**
* Start these browsers for testing. PhantomJS is a headless browser.
* Available browsers: https://npmjs.org/browse/keyword/karma-launcher
* 'Chrome', 'Firefox', 'IE', 'PhantomJS'
*/
browsers: ['PhantomJS'],
reporters: ['mocha'],
/**
* These are the files required to run the tests.
*
* The `Function.prototype.bind` polyfill is required by PhantomJS
* because it uses an older version of JavaScript.
*/
files: [
'tests.webpack.js',
'test/Core-test.jsx',
'test/Layout-test.jsx',
'test/SplitLayout-test.jsx'
],
/**
* The actual tests are preprocessed by the karma-webpack plugin, so that
* their source can be properly transpiled.
*/
preprocessors: {
'tests.webpack.js': ['webpack'],
'test/Core-test.jsx': ['webpack'],
'test/Layout-test.jsx': ['webpack'],
'test/SplitLayout-test.jsx': ['webpack']
},
/**
* level of logging
* possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
*/
logLevel: config.LOG_INFO,
/**
* Use Mocha as the test framework, Sinon for mocking, and
* Chai for assertions.
*/
frameworks: ['mocha', 'chai'],
/**
* The configuration for the karma-webpack plugin.
* This is very similar to the main webpack.local.config.js.
*/
webpack: {
module: {
loaders: [
{ test: /\.jsx?$/, exclude: /node_modules/, loader: 'babel-loader' }
]
},
resolve: {
extensions: ['', '.js', '.jsx']
},
watch: true
},
/**
* Turn off verbose logging of webpack compilation.
*/
webpackServer: {
noInfo: true
},
singleRun: true,
/**
* Array of plugins used
*/
plugins: [
require('karma-chrome-launcher'),
require('karma-firefox-launcher'),
require('karma-ie-launcher'),
require('karma-phantomjs-launcher'),
require('karma-mocha'),
require('karma-mocha-reporter'),
require('karma-chai'),
require('karma-webpack')
],
//client: {
// mocha: {
// reporter: 'html', // change Karma's debug.html to the mocha web reporter
// ui: 'tdd'
// }
//}
};
};