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

chore: fix symlink creation failures on windows in tests #9852

Merged
merged 1 commit into from Apr 21, 2020

Conversation

dubzzz
Copy link
Contributor

@dubzzz dubzzz commented Apr 21, 2020

Summary

Switching to type=junction in fs.symlinks seems to fix the issue.
Before that change, running yarn test-ci was failing due to symlinks on the tests:

  • no babel-jest › fails with syntax error on flow types
  • no babel-jest › instrumentation with no babel-jest

Here is a related ticket on node: nodejs/node#18518

See comments nodejs/node#18518 (comment) and nodejs/node#18518 (comment)

Test plan

The tests relying on those helpers are now passing on my Windows machine without the need to have admit rights.

Let see if they pass the CI

Switching to type=junction seems to fix the issue. Here is a related ticket on node: nodejs/node#18518
Copy link
Member

@SimenB SimenB left a comment

Choose a reason for hiding this comment

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

CI is still happy, so works for me!

@SimenB
Copy link
Member

SimenB commented Apr 21, 2020

Reading the issue it's supposed to be fixed, though?

@dubzzz
Copy link
Contributor Author

dubzzz commented Apr 21, 2020

Reading the issue it's supposed to be fixed, though?

It seems that it still need either to activate developer mode or to run with admin priviledge mode. I am running v12.11.0 (released on 2019-09-25).

See comment nodejs/node#18518 (comment), but conclusion is not clear to me 🤔

Mocha did this https://github.com/apostrophecms/apostrophe/pull/2027/files#diff-168726dbe96b3ce427e7fedce31bb0bcR402-R410

@SimenB
Copy link
Member

SimenB commented Apr 21, 2020

Meh, symlinks are weird, and this still pass CI so let's merge 👍

@SimenB SimenB changed the title Fix Symlink creation failures on windows chore: fix symlink creation failures on windows in tests Apr 21, 2020
@SimenB SimenB merged commit fa4cbbf into jestjs:master Apr 21, 2020
jeysal added a commit to mmkal/jest that referenced this pull request Apr 26, 2020
…pshots

* upstream/master: (39 commits)
  Prints the Symbol name into the error message with a custom asymmetric matcher (jestjs#9888)
  Show coverage of sources related to tests in changed files (jestjs#9769)
  fix: don't /// <reference types="jest" /> (jestjs#9875)
  noCodeFrame respects noStackTrace (jestjs#9866)
  chore: update example to react-native@0.62 (jestjs#9746)
  Improve source map handling when instrumenting transformed code (jestjs#9811)
  Update .vscode/launch.json settings (jestjs#9868)
  chore: verify all packages have the same engine requirement (jestjs#9871)
  fix: pass custom cached realpath function to `resolve` (jestjs#9873)
  chore: mock stealthy-require in tests (jestjs#9855)
  chore: update resolve (jestjs#9872)
  chore: run CircleCI on node 14 (jestjs#9870)
  Add an option to vscode settings to always use workspace TS (jestjs#9869)
  fix(esm): handle parallel imports (jestjs#9858)
  chore: run CI on Node 14 (jestjs#9861)
  feat: add `@jest/globals` package for importing globals explici… (jestjs#9849)
  chore: bump resolve package (jestjs#9859)
  chore(runtime): simplify `createJestObjectFor` (jestjs#9857)
  chore: fix symlink creation failures on windows in tests (jestjs#9852)
  chore: skip mercurial tests when no hg installed (jestjs#9840)
  ...
jeysal added a commit to mmkal/jest that referenced this pull request Apr 26, 2020
…pshots

* upstream/master: (39 commits)
  Prints the Symbol name into the error message with a custom asymmetric matcher (jestjs#9888)
  Show coverage of sources related to tests in changed files (jestjs#9769)
  fix: don't /// <reference types="jest" /> (jestjs#9875)
  noCodeFrame respects noStackTrace (jestjs#9866)
  chore: update example to react-native@0.62 (jestjs#9746)
  Improve source map handling when instrumenting transformed code (jestjs#9811)
  Update .vscode/launch.json settings (jestjs#9868)
  chore: verify all packages have the same engine requirement (jestjs#9871)
  fix: pass custom cached realpath function to `resolve` (jestjs#9873)
  chore: mock stealthy-require in tests (jestjs#9855)
  chore: update resolve (jestjs#9872)
  chore: run CircleCI on node 14 (jestjs#9870)
  Add an option to vscode settings to always use workspace TS (jestjs#9869)
  fix(esm): handle parallel imports (jestjs#9858)
  chore: run CI on Node 14 (jestjs#9861)
  feat: add `@jest/globals` package for importing globals explici… (jestjs#9849)
  chore: bump resolve package (jestjs#9859)
  chore(runtime): simplify `createJestObjectFor` (jestjs#9857)
  chore: fix symlink creation failures on windows in tests (jestjs#9852)
  chore: skip mercurial tests when no hg installed (jestjs#9840)
  ...
@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants