mirror of
https://github.com/Microsoft/vscode
synced 2024-10-02 17:32:41 +00:00
fix node tests
This commit is contained in:
parent
380ac1ef48
commit
824c70b275
|
@ -56,6 +56,22 @@ if (majorRequiredNodeVersion !== currentMajorNodeVersion) {
|
|||
}
|
||||
|
||||
function main() {
|
||||
|
||||
// VSCODE_GLOBALS: node_modules
|
||||
globalThis._VSCODE_NODE_MODULES = new Proxy(Object.create(null), {
|
||||
get(target, mod) {
|
||||
if (!target[mod] && typeof mod === 'string') {
|
||||
target[mod] = require(mod);
|
||||
}
|
||||
return target[mod];
|
||||
}
|
||||
});
|
||||
|
||||
// VSCODE_GLOBALS: package/product.json
|
||||
globalThis._VSCODE_PRODUCT_JSON = require(`${REPO_ROOT}/product.json`);
|
||||
globalThis._VSCODE_PACKAGE_JSON = require(`${REPO_ROOT}/package.json`);
|
||||
|
||||
|
||||
process.on('uncaughtException', function (e) {
|
||||
console.error(e.stack || e);
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue