Skip to content

Commit

Permalink
chore: add failing test for parser configuration and completion
Browse files Browse the repository at this point in the history
  • Loading branch information
AgentEnder committed May 9, 2023
1 parent e517318 commit f9ed905
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions test/completion.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -1210,4 +1210,19 @@ describe('Completion', () => {
});
});
});

describe('parser-configuration', () => {
it('should support strip-dashed', () => {
process.env.SHELL = '/bin/bash';

const r = checkUsage(
() =>
yargs(['--get-yargs-completions', 'a'])
.parserConfiguration({'strip-dashed': true})
.command('apple', 'banana').argv
);

r.logs.should.include('apple');
});
});
});

0 comments on commit f9ed905

Please sign in to comment.