Skip to content

Commit

Permalink
spawn proper ts-node on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
isaacs committed Apr 13, 2023
1 parent 63e0015 commit dfd7f2f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions test/warn-missing-ac.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@ const main = async () => {
// need to run both tests in parallel so we don't miss the close event
t.jobs = 2

const warn = spawn('ts-node', [__filename, 'child'])
const tsNode = process.platform === 'win32' ? 'ts-node.cmd' : 'ts-node'

const warn = spawn(tsNode, [__filename, 'child'])
const warnErr: Buffer[] = []
warn.stderr.on('data', c => warnErr.push(c))

const noWarn = spawn('ts-node', [__filename, 'child'], {
const noWarn = spawn(tsNode, [__filename, 'child'], {
env: {
...process.env,
LRU_CACHE_IGNORE_AC_WARNING: '1',
Expand Down

0 comments on commit dfd7f2f

Please sign in to comment.