Skip to content

Commit cc07dce

Browse files
committed
Load ts-node in the fork call in watchmode test
1 parent e77fbf5 commit cc07dce

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

test/compiler/watcher_proccess.js

Lines changed: 0 additions & 6 deletions
This file was deleted.

test/compiler/watcher_proccess.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import { compile } from "../../src/Compiler";
2+
3+
process.on("message", args => {
4+
compile(args);
5+
});

test/compiler/watchmode.spec.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,10 @@ test.each([
3636
const fileToChangeOut = fileToChange.replace(".ts", ".lua");
3737
const originalTS = fs.readFileSync(fileToChange);
3838

39-
const child = fork(path.join(__dirname, "watcher_proccess.js"), [], { silent: true });
39+
const child = fork(path.join(__dirname, "watcher_proccess.ts"), [], {
40+
silent: true,
41+
execArgv: ["--require", "ts-node/register/transpile-only"],
42+
});
4043

4144
testsCleanup.push(() => {
4245
try {

0 commit comments

Comments
 (0)