forked from Krinkle/example-node-and-browser-qunit-ci
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkarma.conf.js
37 lines (36 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
/* eslint-env node */
module.exports = function (config) {
config.set({
browsers: [
'FirefoxHeadless',
// Consider Chromium and Google Chrome to be similar enough.
// Pick whichever is most likely to be locally installed and kept up-to-date
// (Chromium on Linux, Chrome on macOS/Windows).
// You can override this via CHROME_BIN or CHROMIUM_BIN.
// For example, if your OS defaults to Chrome but you prefer Chromium,
// then set something like CHROME_BIN=/usr/bin/chromium.
(process.platform === 'linux') ? 'ChromiumHeadless' : 'ChromeHeadless'
],
frameworks: ['qunit'],
files: [
'src/MyLib.js',
'test/*.test.js'
],
autoWatch: false,
singleRun: true,
preprocessors: {
'src/*.js': ['coverage']
},
reporters: ['dots', 'coverage'],
coverageReporter: {
reporters: [
{ type: 'lcov', dir: '.nyc_output/' },
// Karma uses subdirs by default to account for multiple browsers.
// For the JSON file, it's important we disable 'subdir' so that
// the 'nyc report' command can pick this up when combining code
// coverage with the Node.js test run.
{ type: 'json', dir: '.nyc_output/', subdir: '.' }
]
}
});
};