Skip to content
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

Merged
merged 2 commits into from
Nov 7, 2017
Merged

test: fix tsc test case #1620

merged 2 commits into from
Nov 7, 2017

Conversation

dead-horse
Copy link
Member

Checklist
  • npm test passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines
Affected core subsystem(s)
Description of change

yield runscript('tsc', { cwd: baseDir });
const dest = path.join(baseDir, 'node_modules/egg');
rimraf.sync(dest);
mkdirp.sync(path.dirname(dest));
Copy link
Member Author

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

Copy link
Member

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-io
Copy link

codecov-io commented Nov 7, 2017

Codecov Report

Merging #1620 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           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.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6804bd3...a664b74. Read the comment docs.

package.json Outdated
@@ -69,8 +69,10 @@
"formstream": "^1.1.0",
"glob": "^7.1.2",
"koa-static": "^3.0.0",
"mkdirp": "^0.5.1",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这两个直接引 mz-modules 就好了吧。

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

改了,刚才没看到

yield runscript('tsc', { cwd: baseDir });
const dest = path.join(baseDir, 'node_modules/egg');
rimraf.sync(dest);
mkdirp.sync(path.dirname(dest));
Copy link
Member

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);

@dead-horse dead-horse merged commit fd1ff63 into master Nov 7, 2017
@dead-horse dead-horse deleted the fix-tsc-test branch November 7, 2017 09:41
popomore pushed a commit that referenced this pull request Nov 7, 2017
test: fix tsc test case (#1620)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants