forked from nevware21/ts-utils
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkarma.debug.worker.conf.js
58 lines (54 loc) · 1.69 KB
/
karma.debug.worker.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
58
process.env.CHROME_BIN = require('puppeteer').executablePath()
module.exports = function (config) {
const typescript = require("@rollup/plugin-typescript");
const plugin = require("@rollup/plugin-node-resolve");
const commonjs = require("@rollup/plugin-commonjs");
config.set({
browsers: ["Chromium_without_security"],
listenAddress: 'localhost',
hostname: 'localhost',
frameworks: [ "mocha-webworker" ],
files: [
{ pattern: "lib/test/src/worker/**/*.ts", included: false },
{ pattern: "lib/test/src/common/**/*.ts", included: false }
],
preprocessors: {
"**/*.ts": [ "rollup" ]
},
rollupPreprocessor: {
plugins: [
typescript({
tsconfig: "./lib/test/tsconfig.worker.karma.json"
}),
plugin.nodeResolve({
browser: true
}),
commonjs()
],
output: {
format: "iife",
dir: "../test-dist",
sourcemap: true
}
},
client: {
mochaWebWorker: {
pattern: [
"lib/test/**/*.js"
]
}
},
coverageIstanbulReporter: {
reports: ["html", "json"],
dir: ".nyc_output"
},
reporters: [ "spec", "coverage-istanbul" ],
logLevel: config.LOG_INFO,
customLaunchers: {
Chromium_without_security: {
base: 'Chrome',
flags: ['--disable-web-security', '--disable-site-isolation-trials']
}
}
})
};