Skip to content

Commit

Permalink
fix: use co-mocha instead of thunk-mocha (#38)
Browse files Browse the repository at this point in the history
  • Loading branch information
fengmk2 authored and dead-horse committed Feb 24, 2017
1 parent 711a967 commit f6b5171
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .autod.conf
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ module.exports = {
dep: [
'istanbul',
'mocha',
'thunk-mocha',
'co-mocha',
'intelli-espower-loader',
'power-assert',
],
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ $ egg-bin debug

### test

Using [mocha] with [thunk-mocha] to run test.
Using [mocha] with [co-mocha] to run test.

[power-assert] is the default `assert` library, and [intelli-espower-loader] will be auto required.

Expand Down Expand Up @@ -214,10 +214,10 @@ run nsp check at /foo/bar with []


[mocha]: https://mochajs.org
[thunk-mocha]: https://npmjs.com/thunk-mocha
[co-mocha]: https://npmjs.com/co-mocha
[glob]: https://github.com/isaacs/node-glob
[istanbul]: https://github.com/gotwarlost/istanbul
[nsp]: https://npmjs.com/thunk-mocha
[nsp]: https://npmjs.com/nsp
[iron-node]: https://github.com/s-a/iron-node
[intelli-espower-loader]: https://github.com/power-assert-js/intelli-espower-loader
[power-assert]: https://github.com/power-assert-js/power-assert
6 changes: 3 additions & 3 deletions README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ $ egg-bin debug

### test

测试工具,使用 [mocha],支持 [thunk-mocha] 扩展。
测试工具,使用 [mocha],支持 [co-mocha] 扩展。

内置了 [intelli-espower-loader] 并使用 [power-assert] 作为断言库,具体参见 https://github.com/atian25/blog/issues/16
在测试代码中只需要 `require('assert')` 即可享受 [power-assert] 带来的体验提升。
Expand Down Expand Up @@ -189,9 +189,9 @@ run nsp check at /foo/bar with []


[mocha]: https://mochajs.org
[thunk-mocha]: https://npmjs.com/thunk-mocha
[co-mocha]: https://npmjs.com/co-mocha
[glob]: https://github.com/isaacs/node-glob
[istanbul]: https://github.com/gotwarlost/istanbul
[nsp]: https://npmjs.com/thunk-mocha
[nsp]: https://npmjs.com/nsp
[intelli-espower-loader]: https://github.com/power-assert-js/intelli-espower-loader
[power-assert]: https://github.com/power-assert-js/power-assert
2 changes: 1 addition & 1 deletion lib/helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ exports.getTestSetupFile = () => {
exports.formatTestArgs = args => {
const newArgs = [
'--timeout', process.env.TEST_TIMEOUT || '30000',
'--require', require.resolve('thunk-mocha'),
'--require', require.resolve('co-mocha'),
];
if (process.env.TEST_REPORTER) {
newArgs.push('--reporter');
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"mocha": "bin/mocha.js"
},
"dependencies": {
"co-mocha": "^1.2.0",
"commander": "^2.9.0",
"common-bin": "^1.0.0",
"debug": "^2.6.0",
Expand All @@ -19,8 +20,7 @@
"mkdirp": "^0.5.1",
"mocha": "^3.2.0",
"power-assert": "^1.4.2",
"rimraf": "^2.5.4",
"thunk-mocha": "^1.0.8"
"rimraf": "^2.5.4"
},
"devDependencies": {
"autod": "^2.7.1",
Expand Down

0 comments on commit f6b5171

Please sign in to comment.