Permalink
Browse files

Tests

  • Loading branch information...
1 parent a7841e5 commit 5c535f815b84385d7dae7f82db68ef44ef8a469a @dpup committed Mar 25, 2011
Showing with 18 additions and 0 deletions.
  1. +18 −0 lib/flags_test.js
View
@@ -121,3 +121,21 @@ exports.testUnrecognizedFlags = function(test) {
});
test.done();
};
+
+exports.testDuplicateFlags = function(test) {
+ flags.reset();
+ flags.defineString('one', '');
+ test.throws(function() {
+ flags.defineString('one', '');
+ });
+ test.done();
+};
+
+exports.testThrowIfDefineAfterParse = function(test) {
+ flags.reset();
+ flags.parse([]);
+ test.throws(function() {
+ flags.defineString('one', '');
+ });
+ test.done();
+};

0 comments on commit 5c535f8

Please sign in to comment.