Skip to content

Commit

Permalink
Update test for split aliases with args
Browse files Browse the repository at this point in the history
  • Loading branch information
Arnesfield committed Mar 24, 2024
1 parent 10657f4 commit 8765413
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions test/argstree.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -581,9 +581,9 @@ describe('argstree', () => {
const options = {
alias: { '-f': '--foo', '-b': '--baz', '-ba': '--bar' },
args: {
'--foo': { min: 1, args: { test: {} } },
'--bar': { min: 1, args: { test: {} } },
'--baz': { min: 1, args: { test: {} } }
'--foo': { min: 2, args: { test: { min: 1 } } },
'--bar': { min: 1, args: {} },
'--baz': { args: {} }
}
} satisfies Options;
expectError({
Expand All @@ -593,16 +593,16 @@ describe('argstree', () => {
equal: options.args['--foo']
});
expectError({
args: ['-bafb=0'],
args: ['-bbaf=0'],
cause: ArgsTreeError.INVALID_RANGE_ERROR,
options,
equal: options.args['--bar']
});
expectError({
args: ['-bfba=0'],
args: ['-bf=foo', 'bar', 'test'],
cause: ArgsTreeError.INVALID_RANGE_ERROR,
options,
equal: options.args['--baz']
equal: options.args['--foo'].args.test
});
});

Expand Down

0 comments on commit 8765413

Please sign in to comment.