test.cb('default', t => { // TODO: Use `execa` here when the `spawn` API is done const cp = childProcess.spawn('./cli.js', {stdio: 'inherit'}); cp.on('error', t.fail); cp.on('close', code => { t.is(code, 0); t.end(); }); });
t.fail(error);
t.fail(error); t.end();
test.cb("tests vueOptions", t => { let req = {}; let res = { response: "", set: function(key, value) { this[key] = value; }, write: function(chunk) { this.response += chunk; }, // tslint:disable-next-line:no-empty send: function(error) { }, // tslint:disable-next-line:no-empty end: function() {}, }; // tslint:disable-next-line:no-shadowed-variable function next(error, req, res) { if (error) { t.fail(error); t.end(); } } expressVueMiddleware(req, res, next); t.is(typeof res.renderVue, "function"); t.end(); });
t.fail(error);
test.cb('main', t => { const cp = childProcess.spawn('./cli.js', {stdio: 'inherit'}); cp.on('error', t.fail); cp.on('close', code => { t.is(code, 0); t.end(); }); });