-
Notifications
You must be signed in to change notification settings - Fork 19
/
karma.conf.js
47 lines (35 loc) · 1.1 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
// Karma configuration
process.env.CHROME_BIN = require('puppeteer').executablePath()
module.exports = function (config) {
config.set({
// frameworks to use
frameworks: ['esm', 'mocha', 'chai'],
// list of files / patterns to load in the browser
files: [
{ pattern: 'javascript/parseBindings.js', type: 'module' },
{ pattern: 'spec/javascript/**/*.js', type: 'module' }
],
plugins: [
require.resolve('@open-wc/karma-esm'),
// fallback: resolve any karma- plugins
'karma-*'
],
// preprocess matching files before serving them to the browser
preprocessors: {
'javascript/parseBindings.js': ['coverage']
},
// test results reporter to use
reporters: ['dots', 'coverage'],
// enable / disable watching file and executing tests whenever any file changes
autoWatch: false,
// start these browsers
browsers: ['ChromeHeadless'],
// Continuous Integration mode
// if true, Karma captures browsers, runs the tests and exits
singleRun: true,
esm: {
nodeResolve: true,
coverage: true
}
})
}