diff --git a/lib/cov_command.js b/lib/cov_command.js index b19afc9e..ea2118f6 100644 --- a/lib/cov_command.js +++ b/lib/cov_command.js @@ -3,7 +3,6 @@ const path = require('path'); const mkdirp = require('mkdirp'); const rimraf = require('rimraf'); -const sleep = require('ko-sleep'); const Command = require('./command'); class CovCommand extends Command { @@ -44,11 +43,6 @@ class CovCommand extends Command { yield this.helper.forkNode(covFile, covArgs, opt); rimraf.sync(process.env.TMPDIR); - // wait 5 second for Windows - if (process.platform === 'win32') { - yield sleep(5000); - } - // create coverage report const reportArgs = this.getReportArgs(coverageDir); yield this.helper.forkNode(covFile, reportArgs, opt); diff --git a/lib/program.js b/lib/program.js index 8b289ec7..4e3b9104 100644 --- a/lib/program.js +++ b/lib/program.js @@ -10,7 +10,11 @@ class Program extends BaseProgram { this.addCommand('dev', path.join(__dirname, 'dev_command.js')); this.addCommand('debug', path.join(__dirname, 'debug_command.js')); this.addCommand('test', path.join(__dirname, 'test_command.js')); - this.addCommand('cov', path.join(__dirname, 'cov_command.js')); + if (process.platform === 'win32') { + this.addCommand('cov', path.join(__dirname, 'test_command.js')); + } else { + this.addCommand('cov', path.join(__dirname, 'cov_command.js')); + } } } diff --git a/package.json b/package.json index bbc15e99..dbb10661 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,6 @@ "egg-utils": "^1.0.0", "glob": "^7.1.1", "istanbul": "^0.4.0", - "ko-sleep": "^1.0.2", "mkdirp": "^0.5.1", "mocha": "^3.0.0", "rimraf": "^2.5.4",