test: add async test case - #339
Conversation
|
从代码到测试都可以用 aa |
9a88474 to
b275040
Compare
| "extends": "eslint-config-egg" | ||
| "extends": "eslint-config-egg", | ||
| "parserOptions": { | ||
| "ecmaVersion": 2017 |
There was a problem hiding this comment.
这个是不是可以放到 eslint-config-egg 里面去了?
There was a problem hiding this comment.
放到 test/fixtures/apps/async-app 这个下面?
There was a problem hiding this comment.
在 test/async/_async.js 里面也有用,感觉还是把它放到 eslint-config-egg 里面吧,不然别人用 node 7 + async 就比较麻烦了。
There was a problem hiding this comment.
那看起来是可以的,以后很多会用 async function 的
There was a problem hiding this comment.
@geekdada 但是会有人基于 node 7.x 开发,要用 async function
b275040 to
b72c52c
Compare
|
|
||
| const nodeVersion = Number(process.version.match(/^v(\d+\.\d)+\./)[1]); | ||
| // only node >= 7.6 support async function without flags | ||
| if (nodeVersion >= 7.6) { |
|
schedule 也加个? |
Codecov Report@@ Coverage Diff @@
## master #339 +/- ##
=====================================
Coverage 100% 100%
=====================================
Files 28 28
Lines 635 635
=====================================
Hits 635 635Continue to review full report at Codecov.
|
Codecov Report@@ Coverage Diff @@
## master #339 +/- ##
=====================================
Coverage 100% 100%
=====================================
Files 28 28
Lines 635 635
=====================================
Hits 635 635Continue to review full report at Codecov.
|
b72c52c to
0a91397
Compare
|
schedule 加了 |
0a91397 to
fb7247d
Compare
Checklist
npm testpassesAffected core subsystem(s)
test
Description of change
增加 async 相关的测试用例,需要等 egg-core 发布新版和 node 7.6 发布。