-
Notifications
You must be signed in to change notification settings - Fork 2
/
karma.config.js
54 lines (49 loc) · 1.19 KB
/
karma.config.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
var { babel } = require('@rollup/plugin-babel')
var commonjs = require('@rollup/plugin-commonjs')
var { nodeResolve } = require('@rollup/plugin-node-resolve')
var tapSpec = require('tap-spec')
process.env.CHROME_BIN = '/usr/bin/google-chrome' //require('puppeteer').executablePath()
module.exports = function (config) {
config.set({
files: [
'./dist/tape.js',
{ pattern: 'app/tests/**/*.spec.js', watched: false }
],
browserConsoleLogOptions: {
level: 'error',
format: '%b %T: %m',
terminal: false
},
preprocessors: {
'app/tests/**/*.spec.js': ['rollup']
},
reporters: ['tap-pretty'],
browsers: ['ChromeHeadless'],
frameworks: ['tap'],
colors: true,
singleRun: true,
rollupPreprocessor: {
external: ['tape'],
plugins: [
nodeResolve(),
commonjs(),
babel({
exclude: /node_modules/,
babelHelpers: 'runtime',
skipPreflightCheck: true
})
],
output: {
format: 'iife',
name: 'RWCE',
globals: {
tape: 'tape'
},
sourcemap: false
}
},
tapReporter: {
prettify: tapSpec
}
})
}