forked from diverted247/txtjs
-
Notifications
You must be signed in to change notification settings - Fork 3
/
testem.js
49 lines (44 loc) · 1.21 KB
/
testem.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
const coverageServer = require("./testem-coverage-server");
const chromeArgs = ["--disable-gpu", "--remote-debugging-port=9222"];
const firefoxArgs = [];
if (process.env.HEADLESS) {
chromeArgs.unshift("--headless");
firefoxArgs.unshift("--headless");
}
let serve_files = [
{ src: coverageServer.clientFile },
{
src:
"node_modules/@recreatejs/jasmine-pixelmatch/dist/jasmine-pixelmatch.js"
},
{ src: "dist/easeljs.js" },
{ src: "dist/pathseg.js" },
{ src: "dist/txt.instrumented.umd.js" },
{ src: "dist/examples.umd.js" },
{ src: "dist/tests.umd.js" }
];
if (!process.env.HEADLESS) {
serve_files.push({ src: "!dist/esnext/tests/_headless.js" });
}
module.exports = {
launch_in_dev: ["Chrome"],
launch_in_ci: ["Chrome"],
browser_args: {
Chrome: chromeArgs,
Firefox: firefoxArgs
},
test_page: "testem.mustache",
src_files: ["src/**/*.ts", "examples/**/*.ts"],
serve_files,
css_files: [],
routes: {
"/images": "images"
},
proxies: coverageServer.proxies,
before_tests: function(config, data, callback) {
coverageServer.startCoverageServer(callback);
},
after_tests: function(config, data, callback) {
coverageServer.shutdownCoverageServer(callback);
}
};