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

symlink tests fail when you run tests on Windows. #2602

Closed
sainthkh opened this issue Jan 31, 2019 · 1 comment · Fixed by #2605
Closed

symlink tests fail when you run tests on Windows. #2602

sainthkh opened this issue Jan 31, 2019 · 1 comment · Fixed by #2605
Labels

Comments

@sainthkh
Copy link
Contributor

🐛 bug report

When you run tests on Windows, tests that use symlinks fail because Windows doesn't allow symlink to normal users by default for security. (You need admin privilege to run them.)

Note: It's the issue for #2590. I'm writing it here because I messed that PR up and started again from scratch.

I'll publish new PR soon.

🎛 Configuration (.babelrc, package.json, cli command)

None

🤔 Expected Behavior

Tests pass without any problem.

😯 Current Behavior

Tests fail and show EPERM error message like below:

 1) resolver
       "before all" hook:
     Error: EPERM: operation not permitted, symlink 'D:\parcel\packages\core\parcel-bundler\test\input\resolver\packages\source' -> 'D:\parcel\packages\core\parcel-bundler\test\input\resolver\node_modules\source'
      at symlinkSync (fs.js:905:3)
      at Context.<anonymous> (test\resolver.js:18:5)
      at process._tickCallback (internal/process/next_tick.js:68:7)

💁 Possible Solution

Open cmd or powershell with admin privilege. If you're not sure, check this post.

🔦 Context

I wanted to contribute to Parcel. So, I forked and cloned the repo and ran test. But it failed without admin privilege warning.

I think it's bad for new contributors like me.

💻 Code Sample

None.

🌍 Your Environment

Software Version(s)
Parcel 1.11.0
Node 10.15.0
npm/Yarn 1.12.3
Operating System Windows 10 Pro 1803
@DeMoorJasper
Copy link
Member

This should work if you run it as administrator for some reason symlinks in windows require high privileges

Sent with GitHawk

DeMoorJasper pushed a commit that referenced this issue Feb 3, 2019
#2605)

* Ignore Kotlin tests and show messages when Java is not installed or configured. (#2603)

* Skip symlink tests and show warning message when tests are run without admin privilege. (#2602)

* Moved parcel-bundler/test/utils.js and integration-tests/test/utils.js into test-utils/src/utils.js. (#2604)

* Fixed eslint errors.

* Use the test to assert this.child.killed rather than checking time difference. (#2609) (#2612)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants