forked from firefox-devtools/debugger
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtests-setup.js
More file actions
33 lines (27 loc) · 957 Bytes
/
tests-setup.js
File metadata and controls
33 lines (27 loc) · 957 Bytes
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
global.Worker = require("workerjs");
import path from "path";
import getConfig from "../../bin/getConfig";
import { setConfig } from "devtools-config";
import { readFileSync } from "fs";
const rootPath = path.join(__dirname, "../../");
const envConfig = getConfig();
const config = {
...envConfig,
workers: {
sourceMapURL: path.join(
rootPath,
"node_modules/devtools-source-map/src/worker.js"
),
parserURL: path.join(rootPath, "src/workers/parser/worker.js"),
prettyPrintURL: path.join(rootPath, "src/workers/pretty-print/worker.js"),
searchURL: path.join(rootPath, "src/workers/search/worker.js")
}
};
global.DebuggerConfig = config;
global.L10N = require("devtools-launchpad").L10N;
global.L10N.setBundle(readFileSync("./assets/panel/debugger.properties"));
setConfig(config);
process.on("unhandledRejection", (reason, p) => {
console.log("Unhandled Rejection at:", p, "reason:", reason);
throw reason;
});