1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-01-10 08:09:06 -05:00
denoland-deno/tests/specs/compile/determinism/setup.ts
David Sherret 074444ab6c
fix(compile): be more deterministic when compiling the same code in different directories (#27395)
Additionaly, this no longer unnecessarily stores the source twice for
file specifiers and fixes some sourcemap issues.

Closes https://github.com/denoland/deno/issues/27284
2024-12-19 12:53:52 -05:00

10 lines
307 B
TypeScript

// for setup, we create two directories with the same file in each
// and then when compiling we ensure this directory name has no
// effect on the output
makeCopyDir("a");
makeCopyDir("b");
function makeCopyDir(dirName) {
Deno.mkdirSync(dirName);
Deno.copyFileSync("main.ts", `${dirName}/main.ts`);
}