/
karma.conf.js
57 lines (48 loc) 路 1.12 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
'use strict'
var istanbul = require('browserify-istanbul')
module.exports = function(config) {
config.set({
client: { requestTestUrl: process.argv[4] },
basePath: '../..',
frameworks: ['tap', 'browserify'],
preprocessors: {
'tests/browser/test.js': ['browserify'],
'*.js,!(tests)/**/*.js': ['coverage']
},
files: [
'tests/browser/test.js'
],
port: 9876,
reporters: ['dots', 'coverage'],
colors: true,
logLevel: config.LOG_ERROR,
autoWatch: false,
browsers: ['PhantomJS_without_security'],
singleRun: true,
plugins: [
'karma-phantomjs-launcher',
'karma-coverage',
'karma-browserify',
'karma-tap'
],
browserify: {
debug: true,
transform: [istanbul({
ignore: ['**/node_modules/**', '**/tests/**']
})]
},
coverageReporter: {
type: 'lcov',
dir: 'coverage/'
},
// Custom launcher to allowe self signed certs.
customLaunchers: {
PhantomJS_without_security: {
base: 'PhantomJS',
flags: [
'--ignore-ssl-errors=true'
]
}
}
})
}