Skip to content

Commit

Permalink
fix: cov replaced warning at win (#49)
Browse files Browse the repository at this point in the history
  • Loading branch information
atian25 authored and dead-horse committed Apr 25, 2017
1 parent 9b040b1 commit d2850a5
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 14 deletions.
24 changes: 24 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<!--
Thank you for your pull request. Please review below requirements.
Bug fixes and new features should include tests and possibly benchmarks.
Contributors guide: https://github.com/eggjs/egg/blob/master/CONTRIBUTING.md
感谢您贡献代码。请确认下列 checklist 的完成情况。
Bug 修复和新功能必须包含测试,必要时请附上性能测试。
Contributors guide: https://github.com/eggjs/egg/blob/master/CONTRIBUTING.md
-->

##### Checklist
<!-- Remove items that do not apply. For completed items, change [ ] to [x]. -->

- [ ] `npm test` passes
- [ ] tests and/or benchmarks are included
- [ ] documentation is changed or added
- [ ] commit message follows commit guidelines

##### Affected core subsystem(s)
<!-- Provide affected core subsystem(s). -->


##### Description of change
<!-- Provide a description of the change below this comment. -->
6 changes: 0 additions & 6 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,6 @@ class EggBin extends Command {

// load directory
this.load(path.join(__dirname, 'lib/cmd'));

/* istanbul ignore if */
if (process.platform === 'win32') {
console.warn('`cov` is replaced with `test` at windows');
this.alias('cov', 'test');
}
}
}

Expand Down
6 changes: 6 additions & 0 deletions lib/cmd/cov.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@ class CovCommand extends Command {
}

* run(context) {
/* istanbul ignore if */
if (process.platform === 'win32') {
console.warn('`cov` is replaced with `test` at windows');
return yield super.run(context);
}

const { cwd, argv, execArgv } = context;
const tmpDir = path.join(cwd, '.tmp');
yield mkdirp(tmpDir);
Expand Down
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,28 +10,28 @@
"dependencies": {
"change-case": "^3.0.1",
"co-mocha": "^1.2.0",
"common-bin": "^2.2.0",
"debug": "^2.6.3",
"common-bin": "^2.3.0",
"debug": "^2.6.4",
"detect-port": "^1.1.1",
"egg-utils": "^2.1.0",
"globby": "^6.1.0",
"intelli-espower-loader": "^1.0.1",
"istanbul": "^1.1.0-alpha.1",
"mocha": "^3.2.0",
"mocha": "^3.3.0",
"mz-modules": "^1.0.0",
"power-assert": "^1.4.2",
"ypkgfiles": "^1.3.1"
"ypkgfiles": "^1.4.0"
},
"devDependencies": {
"autod": "^2.7.1",
"autod": "^2.8.0",
"babel": "^6.3.26",
"babel-preset-airbnb": "^1.0.1",
"babel-register": "^6.4.3",
"coffee": "^3.3.0",
"cross-env": "^3.1.3",
"egg-ci": "^1.5.0",
"egg-ci": "^1.6.0",
"enzyme": "^2.0.0",
"eslint": "^3.18.0",
"eslint": "^3.19.0",
"eslint-config-egg": "^3.2.0",
"jsdom": "^8.0.1",
"mm": "^2.1.0",
Expand Down
2 changes: 1 addition & 1 deletion test/lib/cmd/pkgfiles.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ describe('test/lib/cmd/pkgfiles.test.js', () => {
yield fs.writeFile(path.join(cwd, 'package.json'), '{}');

yield coffee.fork(eggBin, [ 'pkgfiles', '--check' ], { cwd })
.debug()
// .debug()
.expect('stderr', /pkg.files should equal to \[ app, config, app.js ], but got \[ {2}]/)
.expect('code', 1)
.end();
Expand Down

0 comments on commit d2850a5

Please sign in to comment.