Skip to content

Commit

Permalink
Fix spawning child proc in test on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
goto-bus-stop committed Aug 10, 2018
1 parent 1bb1f33 commit dc0cf5b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions test/onPort.test.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
'use strict'

const path = require('path')
const { test } = require('tap')
const spawn = require('child_process').spawn
const split = require('split2')
const hasAsyncHooks = require('has-async-hooks')
const autocannon = require.resolve('../autocannon')
const target = require.resolve('./targetProcess')

test('--on-port flag', { skip: !hasAsyncHooks() }, (t) => {
Expand All @@ -23,7 +23,8 @@ test('--on-port flag', { skip: !hasAsyncHooks() }, (t) => {

t.plan(lines.length * 2)

const child = spawn(autocannon, [
const child = spawn(process.execPath, [
path.join(__dirname, '..'),
'-c', '10',
'-d', '1',
'--on-port', '/',
Expand Down

0 comments on commit dc0cf5b

Please sign in to comment.