Files
cline-multi-mirror/src/test/requires.ts
T
Tomás Barreiro b8e2fd669d fix unit test set-up and CI workflow (#3154)
* Fix unit test set-up

* run tests on CI

* update failing tests

* Update node

Update the coverage job node version
2025-04-28 16:30:40 -07:00

18 lines
415 B
TypeScript

const Module = require("module")
const originalRequire = Module.prototype.require
/**
* VSCode is not available during unit tests
* @see {@link file://./vscode-mock.ts}
*/
Module.prototype.require = function (path: string) {
if (path === "vscode") {
return require("./vscode-mock")
}
return originalRequire.call(this, path)
}
// Required to have access to String.prototype.toPosix
import "../utils/path"