forked from msgpack/msgpack-javascript
-
Notifications
You must be signed in to change notification settings - Fork 2
/
karma.conf.ts
75 lines (71 loc) · 1.76 KB
/
karma.conf.ts
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
const path = require("path");
// const webpack = require("webpack");
// eslint-disable-next-line import/no-default-export
export default function configure(config: any) {
config.set({
customLaunchers: {
// To debug it wih IE11,
// Install `karma-virtualbox-ie11-launcher`,
// and configure custom launchers like this:
// IE11: {
// base: "VirtualBoxIE11",
// keepAlive: true,
// vmName: "IE11 - Win10",
// },
},
browsers: ["ChromeHeadless", "FirefoxHeadless"],
basePath: "",
frameworks: ["mocha"],
files: ["./test/karma-run.ts"],
exclude: [],
preprocessors: {
"**/*.ts": ["webpack", "sourcemap"],
},
reporters: ["dots"],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
singleRun: false,
concurrency: 1,
browserNoActivityTimeout: 60_000,
webpack: {
mode: "production",
resolve: {
extensions: [".ts", ".tsx", ".mjs", ".js", ".json", ".wasm"],
alias: {
"@msgpack/msgpack": path.resolve(__dirname, "src"),
},
},
module: {
rules: [
{
test: /\.tsx?$/,
loader: "ts-loader",
options: {
configFile: "tsconfig.test-karma.json",
// FIXME: some types for dependencies cannot be resolved, so ignore type checking for now.
transpileOnly: true,
},
},
],
},
plugins: [],
optimization: {
minimize: false,
},
performance: {
hints: false,
},
devtool: "inline-source-map",
},
mime: {
"text/x-typescript": ["ts", "tsx"],
},
client: {
mocha: {
timeout: 15_000,
},
},
});
}