UNPKG

1.19 kBJavaScriptView Raw
1module.exports = wallaby => ({
2 files: [
3 "tsconfig.base.json",
4 "tsconfig.json",
5 "migrations/**/*",
6 "legacy-reexport/**/*.ts",
7 "compat/**/*.ts",
8 "src/**/*.ts",
9 { pattern: "spec/helpers/*.ts", instrument: false, load: true }
10 ],
11
12 tests: ["spec/**/*-spec.ts"],
13
14 testFramework: {
15 type: "mocha",
16 path: "mocha"
17 },
18
19 env: {
20 type: "node"
21 },
22
23 workers: { initial: 2, regular: 1 },
24
25 setup: function (w) {
26 if (!global._tsconfigPathsRegistered) {
27 const tsConfigPaths = require("tsconfig-paths");
28 tsConfigPaths.register();
29 global._tsconfigPathsRegistered = true;
30 }
31
32 // Global test helpers
33 global.mocha = require("mocha");
34 global.Suite = global.mocha.Suite;
35 global.Test = global.mocha.Test;
36
37 //delete global context due to avoid issue by reusing process
38 //https://github.com/wallabyjs/public/issues/536
39 if (global.asDiagram) {
40 delete global.asDiagram;
41 }
42
43 const mocha = wallaby.testFramework;
44 const path = require("path");
45 require(path.resolve(w.projectCacheDir, "spec/helpers/polyfills"))
46 mocha.ui(path.resolve(w.projectCacheDir, "spec/helpers/testScheduler-ui"));
47 }
48});