import ava from "ava"; import passed from "../src"; const app = passed("my command here --cat meow -fluff"); ava("command", function(test) { test.is(app.getCommand(), "my command here"); }); ava("flag", function(test) { test.is(app.getOption("fluff"), true); }); ava("option test", function(test) { test.is(app.getOption("cat"), "meow"); }); ava("handler test", function(test) { app.on("my command here", () => null); app.on("my command", () => test.fail()); test.pass(); });