Skip to content
This repository has been archived by the owner on Dec 27, 2024. It is now read-only.

Commit

Permalink
test: in Node 19 one of the errors has change so fixed in the test
Browse files Browse the repository at this point in the history
  • Loading branch information
joolfe committed Dec 26, 2022
1 parent b1a46a6 commit e4e07f9
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions test/cli.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,12 @@ describe('Cli specs', function () {
})

it('should print an error when options file is not a valid json', async function () {
await rejects(execa('node', [cliPath, COLLECTION_SIMPLE, '-o', INVALID_OPTIONS_INFO]), {
name: 'Error',
stderr: 'Error: invalid "options" parameter -> Unexpected token i in JSON at position 6',
exitCode: 1
await rejects(execa('node', [cliPath, COLLECTION_SIMPLE, '-o', INVALID_OPTIONS_INFO]), (err) => {
equal(err.name, 'Error')
equal(err.exitCode, 1)
ok(err.stderr === 'Error: invalid "options" parameter -> Expected property name or \'}\' in JSON at position 6' ||
err.stderr === 'Error: invalid "options" parameter -> Unexpected token i in JSON at position 6')
return true
})
})

Expand Down

0 comments on commit e4e07f9

Please sign in to comment.