Skip to content

Commit

Permalink
failing short test
Browse files Browse the repository at this point in the history
  • Loading branch information
James Halliday committed Apr 13, 2013
1 parent c7817d1 commit dafe3e1
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions test/short.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
var optimist = require('../index');
var test = require('tap').test;

test('-n123', function (t) {
t.plan(1);
var parse = optimist.parse([ '-n123' ]);
t.equal(parse.n, 123);
});

test('-123', function (t) {
t.plan(3);
var parse = optimist.parse([ '-123', '456' ]);
t.equal(parse['1'], true);
t.equal(parse['2'], true);
t.equal(parse['3'], 456);
});

0 comments on commit dafe3e1

Please sign in to comment.