Skip to content

Commit

Permalink
test: accept differently formatted output
Browse files Browse the repository at this point in the history
The default for Node.js's `util.inspect` `compact` option might soon
change to `3` which slightly changes the default output for objects.
This change accepts both formats so that the test passes in all Node.js
versions.

Refs: nodejs/node#27109
  • Loading branch information
BridgeAR committed Apr 7, 2019
1 parent ac3f10c commit e3d42dc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/yargs.js
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,7 @@ describe('yargs dsl tests', () => {
builder (yargs) { return yargs },
handler (argv) {}
})
}).to.throw(/No command name given for module: { desc: 'A command with no name',\n {2}builder: \[Function(: builder)?],\n {2}handler: \[Function(: handler)?] }/)
}).to.throw(/No command name given for module: {(\n )? desc: 'A command with no name',\n {2}builder: \[Function(: builder)?],\n {2}handler: \[Function(: handler)?](\n| )}/)
})
})

Expand Down

0 comments on commit e3d42dc

Please sign in to comment.