-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test: fix tsc test case #1620
test: fix tsc test case #1620
Conversation
test/ts/index.test.js
Outdated
yield runscript('tsc', { cwd: baseDir }); | ||
const dest = path.join(baseDir, 'node_modules/egg'); | ||
rimraf.sync(dest); | ||
mkdirp.sync(path.dirname(dest)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't use npm link, it will reinstall all the node_modules
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const mkdirp = require('mz-modules/mkdirp');
const rimraf = require('mz-modules/rimraf');
const fs = require('mz/fs');
yield rimraf(dest);
yield mkdirp(path.dirname(dest));
yield fs.symlink('../../../../../', dest);
Codecov Report
@@ Coverage Diff @@
## master #1620 +/- ##
=======================================
Coverage 99.72% 99.72%
=======================================
Files 29 29
Lines 715 715
=======================================
Hits 713 713
Misses 2 2 Continue to review full report at Codecov.
|
package.json
Outdated
@@ -69,8 +69,10 @@ | |||
"formstream": "^1.1.0", | |||
"glob": "^7.1.2", | |||
"koa-static": "^3.0.0", | |||
"mkdirp": "^0.5.1", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这两个直接引 mz-modules
就好了吧。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
改了,刚才没看到
test/ts/index.test.js
Outdated
yield runscript('tsc', { cwd: baseDir }); | ||
const dest = path.join(baseDir, 'node_modules/egg'); | ||
rimraf.sync(dest); | ||
mkdirp.sync(path.dirname(dest)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const mkdirp = require('mz-modules/mkdirp');
const rimraf = require('mz-modules/rimraf');
const fs = require('mz/fs');
yield rimraf(dest);
yield mkdirp(path.dirname(dest));
yield fs.symlink('../../../../../', dest);
test: fix tsc test case (#1620)
Checklist
npm test
passesAffected core subsystem(s)
Description of change