Skip to content

Commit

Permalink
fix(tests): shebangs don't work on Windows (#71)
Browse files Browse the repository at this point in the history
  • Loading branch information
XhmikosR committed Feb 10, 2020
1 parent 6bf3021 commit 6baff98
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions packages/lockfile-lint/__tests__/cli.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const cliExecPath = path.join(__dirname, '../bin/lockfile-lint.js')

describe('CLI tests', () => {
test('Running without parameters should display help', done => {
const process = childProcess.spawn(cliExecPath, [])
const process = childProcess.spawn('node', [cliExecPath])

let output = ''
process.stderr.on('data', chunk => {
Expand All @@ -23,7 +23,7 @@ describe('CLI tests', () => {
})

test('Running without parameters should display a requirement for the p option', done => {
const process = childProcess.spawn(cliExecPath, [])
const process = childProcess.spawn('node', [cliExecPath])

let output = ''
process.stderr.on('data', chunk => {
Expand All @@ -37,7 +37,8 @@ describe('CLI tests', () => {
})

test('Linting a file that has wrong host should display an error message and use exit code 1', done => {
const process = childProcess.spawn(cliExecPath, [
const process = childProcess.spawn('node', [
cliExecPath,
'--type',
'yarn',
'--path',
Expand All @@ -63,7 +64,8 @@ describe('CLI tests', () => {
})

test('Linting a file that has wrong host should return exit code 1', done => {
const process = childProcess.spawn(cliExecPath, [
const process = childProcess.spawn('node', [
cliExecPath,
'--type',
'yarn',
'--path',
Expand Down

0 comments on commit 6baff98

Please sign in to comment.