-
Notifications
You must be signed in to change notification settings - Fork 2
/
karma.conf.js
47 lines (46 loc) · 1.05 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
module.exports = function(config) {
const files = "src/test/browser/**/*.ts*";
config.set({
basePath: "",
frameworks: [ "browserify", "tap" ],
files: [ files ],
preprocessors: {
[files]: [ "browserify" ]
},
browserify: {
transform: [
[ "brfs" ],
[ "babelify", { presets: [ "airbnb" ] } ]
],
plugin: [
[ "tsify" ]
],
configure: function(bundle) {
bundle.require(require("ud/noop"), { expose: "ud" });
bundle.on("prebundle", function() {
bundle.external("react/addons");
bundle.external("react/lib/ReactContext");
bundle.external("react/lib/ExecutionEnvironment");
});
}
},
reporters: ["tap-pretty"],
tapReporter: {
prettifier: "tap-diff",
separator: true
},
port: 9876,
colors: true,
logLevel: config.LOG_DEBUG,
autoWatch: process.env.WATCH === "true",
browserConsoleLogOptions: {
level: "error",
format: "%b %T: %m",
terminal: false
},
browsers: process.env.CI === "true"
? [ "Chrome" ]
: [ "jsdom" ],
singleRun: !(process.env.WATCH === "true")
});
}