-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathkarma.conf.js
More file actions
25 lines (24 loc) · 824 Bytes
/
karma.conf.js
File metadata and controls
25 lines (24 loc) · 824 Bytes
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
/* eslint no-process-env: 0, no-magic-numbers: 0, max-statements: 0 */
const webpack = require("./webpack.config.test");
module.exports = function(config) {
config.set({
mime: {"text/x-typescript": ["ts", "tsx"]}, // fix typescript serving video/mp2t mime type
frameworks: ["mocha", "detectBrowsers"],
files: ["test/**/*.ts"],
preprocessors: {"test/**/*.ts": ["webpack", "sourcemap", "espower"]},
reporters: ["mocha"],
webpack,
detectBrowsers: {
usePhantomJS: false,
postDetection(availableBrowsers) {
const result = availableBrowsers;
const chromeIndex = availableBrowsers.indexOf("Chrome");
if (chromeIndex >= 0) {
result.splice(chromeIndex, 1);
result.push("ChromeHeadless");
}
return result;
},
},
});
};