buster-cli
Advanced tools
Comparing version 0.2.1 to 0.2.2
@@ -150,5 +150,7 @@ var busterArgs = require("buster-args"); | ||
verbose.addValidator(function (opt) { | ||
verbose.addValidator(function (opt, promise) { | ||
if (opt.timesSet > 2) { | ||
return "-v can only be set two times."; | ||
promise.reject("-v can only be set two times."); | ||
} else { | ||
promise.resolve(); | ||
} | ||
@@ -155,0 +157,0 @@ }); |
{ | ||
"name": "buster-cli", | ||
"version": "0.2.1", | ||
"version": "0.2.2", | ||
"description": "Internal wrapper and util for creating CLIs in the buster project.", | ||
@@ -5,0 +5,0 @@ "author": { "name": "August Lilleaas and Christian Johansen" }, |
@@ -385,3 +385,3 @@ var buster = require("buster"); | ||
var someOpt = this.cli.opt("-a", "--aa", "Aaaaa"); | ||
someOpt.addValidator(function () { return "An error."; }); | ||
someOpt.addValidator(function (arg, promise) { promise.reject("An error."); }); | ||
this.cli.run(["-a"], function () { | ||
@@ -388,0 +388,0 @@ refute(self.cli.onRun.called); |
34213
895