Skip to content

Commit

Permalink
chore: use process.execPath rather than node in test (#145)
Browse files Browse the repository at this point in the history
Make sure that the test is run with the version of Node.js currently
being used to execute the test suite, rather than whatever is first in
the user's path.
  • Loading branch information
Trott authored and shellscape committed Oct 1, 2019
1 parent 5a42ada commit d221504
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ test.cb('process all rows', (t) => {

test('binary stanity', async (t) => {
const binPath = path.resolve(__dirname, '../bin/csv-parser')
const { stdout } = await execa(`echo "a\n1" | node ${binPath}`, { shell: true })
const { stdout } = await execa(`echo "a\n1" | ${process.execPath} ${binPath}`, { shell: true })

t.snapshot(stdout)
})

0 comments on commit d221504

Please sign in to comment.