midway-bin
Version:
Midway Command Tools
19 lines (15 loc) • 385 B
JavaScript
;
const co = require('co');
class TestCommand extends require('egg-bin').TestCommand {
constructor(rawArgv) {
super(rawArgv);
this.usage = 'Usage: midway-bin test [files] [options]';
}
async run(context) {
if (!context.env.NODE_ENV) {
context.env.NODE_ENV = 'unittest';
}
await co(super.run(context));
}
}
module.exports = TestCommand;