Skip to content

Commit

Permalink
Adding a test-case for notFlags segregation
Browse files Browse the repository at this point in the history
  • Loading branch information
ELLIOTTCABLE authored and James Halliday committed May 12, 2014
1 parent ce4a1e6 commit 715c1e3
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/dash.js
Expand Up @@ -22,3 +22,10 @@ test('-a -- b', function (t) {
t.deepEqual(parse([ '--a', '--', 'b' ]), { a: true, _: [ 'b' ] });
t.deepEqual(parse([ '--a', '--', 'b' ]), { a: true, _: [ 'b' ] });
});

test('move arguments after the -- into their own `--` array', function(t) {
t.plan(1);
t.deepEqual(
parse([ '--name', 'John', 'before', '--', 'after' ], { '--': true }),
{ name: 'John', _: [ 'before' ], '--': [ 'after' ] });
});

0 comments on commit 715c1e3

Please sign in to comment.