UNPKG

nodejs-shell-cmd-context

Version:

A context object for communication between shell and commands.

20 lines (13 loc) 384 B
"use strict"; var Context = require("src/Context.js"); var Test = require("sirrobert-test-vows"); new Test( "test name", { when: "testing context", "foo": () => { var c = new Context(); c.requestCommand("foo", "bar"); Test.is.equal(c.requestedCommands[0].name, "foo"); Test.is.equal(c.requestedCommands[0].params, "bar"); } }).run(module);