-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathkarma.conf.js
69 lines (52 loc) · 1.74 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
59
60
61
62
63
64
65
66
67
68
69
'use strict';
var istanbul = require('browserify-istanbul');
/*
* Karam Config.
* @see https://github.com/karma-runner/karma/blob/master/docs/config/01-configuration-file.md
*/
module.exports = function (config) {
config.set({
// Base path that will be used to resolve all patterns.
basePath: './',
// Frameworks: https://npmjs.org/browse/keyword/karma-adapter
frameworks: ['mocha', 'chai', 'sinon', 'browserify'],
// Browserify config.
browserify: {
debug: true,
transform: [istanbul({
ignore: ['**/*unit.js']
})]
},
// Patterns to load in the browser.
files: [
'lib/**/*.js'
],
// How long will Karma wait for a message from a browser before disconnecting from it (in ms).
browserNoActivityTimeout: 60000,
// List of files to exclude.
exclude: [],
// Preprocess matching files before serving them to the browser.
// Available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
preprocessors: {
'lib/**/*.js': ['browserify']
},
// Available reporters: https://npmjs.org/browse/keyword/karma-reporter
reporters: ['coverage', 'progress'],
coverageReporter: {
type: 'html',
dir: 'coverage/'
},
// Web server port.
port: 9876,
// Enable/disable colors in the output - reporters and logs.
colors: true,
// Logging levels: [config.LOG_DISABLE, config.LOG_ERROR, config.LOG_WARN, config.LOG_INFO, config.LOG_DEBUG]
logLevel: config.LOG_INFO,
// Enable/disable watching files.
autoWatch: true,
// Available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
browsers: ['PhantomJS', 'Chrome'],
// Continuous Integration mode.
singleRun: false
});
};