aboutsummaryrefslogtreecommitdiff
path: root/node_modules/nomnom/test/option.js
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/nomnom/test/option.js')
-rw-r--r--node_modules/nomnom/test/option.js44
1 files changed, 0 insertions, 44 deletions
diff --git a/node_modules/nomnom/test/option.js b/node_modules/nomnom/test/option.js
deleted file mode 100644
index e3934d75e..000000000
--- a/node_modules/nomnom/test/option.js
+++ /dev/null
@@ -1,44 +0,0 @@
-var nomnom = require("../nomnom");
-
-var parser = nomnom()
- .option('debug', {
- abbr: 'x',
- flag: true,
- help: 'Print debugging info'
- })
- .option('config', {
- abbr: 'c',
- default: 'config.json',
- help: 'JSON file with tests to run'
- })
- .option('version', {
- flag: true,
- help: 'print version and exit',
- callback: function() {
- return "version 1.2.4";
- }
- });
-
-
-exports.testOption = function(test) {
- var opts = parser.parse(["-x", "--no-verbose"]);
-
- test.strictEqual(opts.debug, true);
- test.equal(opts.config, "config.json");
- test.done();
-}
-
-
-exports.testCommandOption = function(test) {
- var parser = nomnom()
- parser.command('test')
- .option('fruit', {
- abbr: 'f',
- flag: true
- })
-
- var opts = parser.parse(["test", "-f"]);
-
- test.strictEqual(opts.fruit, true);
- test.done();
-}