Skip to content

Commit dfd7f2f

Browse files
committed
spawn proper ts-node on windows
1 parent 63e0015 commit dfd7f2f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

test/warn-missing-ac.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,13 @@ const main = async () => {
66
// need to run both tests in parallel so we don't miss the close event
77
t.jobs = 2
88

9-
const warn = spawn('ts-node', [__filename, 'child'])
9+
const tsNode = process.platform === 'win32' ? 'ts-node.cmd' : 'ts-node'
10+
11+
const warn = spawn(tsNode, [__filename, 'child'])
1012
const warnErr: Buffer[] = []
1113
warn.stderr.on('data', c => warnErr.push(c))
1214

13-
const noWarn = spawn('ts-node', [__filename, 'child'], {
15+
const noWarn = spawn(tsNode, [__filename, 'child'], {
1416
env: {
1517
...process.env,
1618
LRU_CACHE_IGNORE_AC_WARNING: '1',

0 commit comments

Comments
 (0)