Skip to content

Commit

Permalink
cover the case of already numbers, at 100% coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
James Halliday committed May 11, 2014
1 parent 9bf2d36 commit b2bb044
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/num.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,11 @@ test('nums', function (t) {
t.deepEqual(typeof argv._[0], 'number');
t.end();
});

test('already a number', function (t) {
var argv = parse([ '-x', 1234, 789 ]);
t.deepEqual(argv, { x : 1234, _ : [ 789 ] });
t.deepEqual(typeof argv.x, 'number');
t.deepEqual(typeof argv._[0], 'number');
t.end();
});

0 comments on commit b2bb044

Please sign in to comment.