MCPcopy
hub / github.com/madeleineostoja/rucksack / cli

Function cli

test/test.js:30–46  ·  view source on GitHub ↗
(cmd, callback)

Source from the content-addressed store, hash-verified

28};
29
30function cli(cmd, callback) {
31 process.chdir(__dirname);
32
33 let ps,
34 out = '',
35 err = '';
36
37 ps = spawn(process.execPath, [
38 path.resolve(__dirname, '../bin/cmd.js')
39 ].concat(cmd));
40
41 ps.stdout.on('data', buffer => out += buffer);
42 ps.stderr.on('data', buffer => err += buffer);
43 ps.on('exit', function(code) {
44 callback.call(this, err, out, code);
45 });
46};
47
48function cliTest(fixture, args, done) {
49 let input = fixture + '.css',

Callers 1

cliTestFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected