forked from krasimir/navigo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkarma.conf.js
50 lines (49 loc) · 1.25 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
var args = require('./test/args');
var getBrowser = args.getBrowser;
var isWatching = args.isWatching;
module.exports = function (config) {
config.set({
basePath: '.',
frameworks: ['browserify', 'source-map-support', 'mocha'],
files: [
'./test/setup.js',
'./test/spec/**/*.spec.*'
],
exclude: [],
preprocessors: {
'src/**/*.js': [ 'browserify' ],
'test/**/*.js': [ 'browserify' ]
},
reporters: ['mocha'],
// web server port
port: 9876,
colors: true,
logLevel: config.LOG_ERROR,
autoWatch: true,
browsers: [ getBrowser() ], // Chrome, PhantomJS, Firefox
singleRun: !isWatching(),
client: {
captureConsole: true
},
browserify: {
debug: true,
insertGlobals: false,
detectGlobals: true,
noBuiltins: true,
transform: [
[ 'babelify', { sourceMaps: true }]
],
extensions: [ '.js' ]
},
plugins: [
require('karma-chrome-launcher'),
require('karma-firefox-launcher'),
require('karma-phantomjs-launcher'),
require('karma-mocha'),
require('karma-mocha-reporter'),
require('karma-browserify'),
require('karma-source-map-support')
]
});
};
module.exports.getBrowser = getBrowser;