-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathallTests.ts
33 lines (29 loc) · 852 Bytes
/
allTests.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
import { runSuites, Suite } from "./util/testBench/testing";
import { coreTests } from "./core/tests";
import { lwbTests } from "./languageWorkbench/tests";
import { appsTests } from "./apps/tests";
import { utilTests } from "./util/tests";
// TODO: use a real arg parser
const flags = new Set(process.argv.slice(2));
const writeResults = flags.has("--write-results");
const stayAlive = flags.has("--stay-alive");
// TODO: nested suites
const suites: { [name: string]: Suite } = {
...coreTests(writeResults),
...lwbTests(writeResults),
...appsTests(writeResults),
...utilTests(writeResults),
};
try {
runSuites(suites);
} catch (e) {
console.error(e.message);
if (!stayAlive) {
console.log("exiting");
process.exit(1);
}
}
if (stayAlive) {
console.log("keeping VM alive for inspector...");
setInterval(() => {}, 100);
}