Skip to content

Commit

Permalink
chore: review
Browse files Browse the repository at this point in the history
  • Loading branch information
WillieRuemmele committed Jun 26, 2023
1 parent 5e265f8 commit 438a027
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/parser/parse.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,13 @@ describe('parse', () => {
await parse(['--myflag', '--second', 'value'], {
flags: {myflag: Flags.string({required: true}), second: Flags.string()},
})
assert.fail('should have thrown')
} catch (error) {
expect((error as CLIError).message).to.include('Flag --myflag expects a value')
}
})

it('throws error when no value provided to required short char flag', async () => {
it('throws error when no value provided to required flag before a short char flag', async () => {
try {
await parse(['--myflag', '-s', 'value'], {
flags: {myflag: Flags.string({required: true}), second: Flags.string({char: 's'})},
Expand Down

0 comments on commit 438a027

Please # to comment.