-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathkarma.conf.js
58 lines (56 loc) · 1.46 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
'use strict';
var istanbul = require('browserify-istanbul');
module.exports = function(config) {
config.set({
frameworks: [
'phantomjs-shim',
'browserify',
'jasmine'
],
basePath: '',
// Prevent 404s showing up when assets are requested by tests.
proxies: {
'/img/': 'http://localhost:9876/base/test/assets/img/'
},
// Specify the JS to compile to create a functioning test environment.
files: [
{
pattern: 'test/assets/img/*.*',
watched: false,
included: false,
served: true,
nocache: false
},
'node_modules/babel-core/browser-polyfill.js',
'src/framework/**/*.jsx',
'src/framework/**/*.js'
],
exclude: [
// If this is not excluded it will complain that that babel-core is already included
'src/framework/index.js'
],
browsers: ['PhantomJS'],
// The reporters with which to surface test results.
reporters: [
'spec',
'junit'
],
coverageReporter: {
dir: 'reports/coverage'
},
junitReporter: {
outputDir: 'reports/karma'
},
// Specify preprocessors through which files should be run, excluding test
// files.
preprocessors: {
'src/framework/**/*.js': ['browserify'],
'src/framework/**/*.jsx': ['browserify']
},
// Configuration for the above `browserify` preprocessor.
browserify: {
debug: true,
transform: ['babelify']
}
});
};