test(team): resolve wrapper modules from repo root

This commit is contained in:
777genius 2026-04-23 21:23:37 +03:00
parent bd49e9b09d
commit 155a9f76ab

View file

@ -34,7 +34,9 @@ async function bundleWorkerForTests(): Promise<string> {
outfile,
[
"const path = require('node:path');",
"const { register } = require('tsx/cjs/api');",
"const { createRequire } = require('node:module');",
"const requireFromRepo = createRequire(path.join(process.cwd(), 'package.json'));",
"const { register } = requireFromRepo('tsx/cjs/api');",
"register({ tsconfigPath: path.join(process.cwd(), 'tsconfig.json') });",
"require(path.join(process.cwd(), 'src', 'main', 'workers', 'team-fs-worker.ts'));",
'',