MCPcopy Create free account
hub / github.com/unconed/TermKit / testCommands

Function testCommands

Node/test.js:142–156  ·  view source on GitHub ↗

* Test command handling.

(assert)

Source from the content-addressed store, hash-verified

140 * Test command handling.
141 */
142function testCommands(assert) {
143 mockShell([
144// { query: 5, method: 'shell.run', args: { tokens: [ 'pwd' ], ref: 7 } },
145 { query: 5, method: 'shell.run', args: { tokens: [ 'cat', 'test.js' ], ref: 4 } },
146 ], function (messages, success) {
147 /*
148 for (i in messages) {
149 console.log(messages[i]);
150 messages[i].args && messages[i].args.objects && console.log('Objects', messages[i].args.objects);
151 }
152 */
153 var last = messages[messages.length - 1];
154 assert(last.success && last.answer == 5, "Run single command");
155 });
156}
157
158/**
159 * Test mime-type handling.

Callers

nothing calls this directly

Calls 2

mockShellFunction · 0.85
assertFunction · 0.85

Tested by

no test coverage detected