Skip to content

Commit 92f3341

Browse files
committed
remove redundant tests
1 parent dc27c9d commit 92f3341

File tree

1 file changed

+0
-31
lines changed

1 file changed

+0
-31
lines changed

test/e2e/docs.test.ts

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -393,37 +393,6 @@ describe('docs', () => {
393393
});
394394
});
395395
describe('subparsers', () => {
396-
test('default', async () => {
397-
const subparser = new Parser()
398-
.option('greeting', {
399-
longFlag: '--greeting',
400-
shortFlag: '-g',
401-
defaultValue: '',
402-
})
403-
.defaultHandler(({ options }) => {
404-
console.log(options.greeting);
405-
});
406-
407-
const parser = new Parser()
408-
.option('greeting', {
409-
longFlag: '--greeting',
410-
shortFlag: '-g',
411-
defaultValue: '',
412-
})
413-
.subparser('v2', {
414-
parser: subparser,
415-
description: 'Version 2 of this CLI',
416-
})
417-
.defaultHandler(({ options }) => {
418-
console.log(options.greeting);
419-
});
420-
421-
await parser.parse(['-g', 'hello from the main parser']).call();
422-
expect(consoleLog).toHaveBeenLastCalledWith('hello from the main parser');
423-
424-
await parser.parse(['v2', '-g', 'hello from the subparser']).call();
425-
expect(consoleLog).toHaveBeenLastCalledWith('hello from the subparser');
426-
});
427396
test('with shared options', async () => {
428397
type CommonOptions = {
429398
verbose: boolean;

0 commit comments

Comments
 (0)