forked from surveyjs/survey-library
-
Notifications
You must be signed in to change notification settings - Fork 0
/
karma.conf.js
53 lines (50 loc) · 1.48 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
48
49
50
51
52
53
var path = require("path");
var webpack = require("webpack");
var webpackConfigCreator = require("./webpack.config");
var webpackConfig = webpackConfigCreator({
platform: "knockout",
buildType: "dev"
});
process.env.CHROME_BIN = require("puppeteer").executablePath();
/*setup ts config file for tests ("noImplicitAny": false)*/
webpackConfig.module.rules[0].use.options.configFile = path.join(
__dirname,
"tsconfigForTests.json"
);
module.exports = function(config) {
config.set({
basePath: "",
frameworks: ["qunit"],
files: ["tests/entries/*.ts"],
exclude: [],
mime: {
"text/x-typescript": ["ts", "tsx"]
},
browserNoActivityTimeout: 100000,
junitReporter: {
outputDir: "tmp/testresults/",
outputFile: "test-results.xml"
},
preprocessors: {
"**/*.ts": ["webpack", "sourcemap"]
},
webpack: {
module: webpackConfig.module,
resolve: webpackConfig.resolve,
plugins: [
new webpack.SourceMapDevToolPlugin({
filename: null, // if no value is provided the sourcemap is inlined
test: /\.(ts|js)($|\?)/i // process .js and .ts files only
})
]
},
reporters: ["progress", "dots", "junit"],
browsers: ["ChromeHeadless"],
colors: true,
// possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
logLevel: config.LOG_WARN,
autoWatch: true,
singleRun: false,
concurrency: Infinity
});
};