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

Option to run always with --watchAll instead of --watch #558

Closed
lordofthelake opened this issue Feb 27, 2020 · 2 comments · Fixed by #577
Closed

Option to run always with --watchAll instead of --watch #558

lordofthelake opened this issue Feb 27, 2020 · 2 comments · Fixed by #577

Comments

@lordofthelake
Copy link
Contributor

lordofthelake commented Feb 27, 2020

Environment

  1. node -v: v12.13.1
  2. npm -v: 6.13.6
  3. Operating system: macOS Mojave

Prerequisite

  • are you able to run jest test from command line? Only using --watchAll
  • how do you run your tests from command line? (for example: npm run test or node_modules/.bin/jest) pnpx jest --watchAll

Steps to Reproduce

In a monorepo using git submodules and a multi-project setup (jest.config.js in the root using the projects option to run the test suites of all packages), running Jest in watch mode (jest --watch) always errors out with something along the lines of:

Determining test suites to run...

  ● Test suite failed to run

    fatal: ../packages/a-dependency-outside-the-submodule: '../packages/a-dependency-outside-the-submodule' is outside repository

This is a variant of a known Jest issue, and the usual workaround is to run Jest with --watchAll instead of --watch.

vscode-jest aways errors out, though, because it tries to use --watch and there is no way (that I could find) for force it to run Jest with --watchAll.

Expected Behavior

I would like to have an option to run Jest with vscode-jest using watchAll instead of watch, or having the extension detect this kind of error and behave accordingly.

@connectdotz
Copy link
Collaborator

looks like there is code attempted to detect such situation here, is that not working for your use case or maybe the regex is outdated or too rigid... want to give it a try to fix it?

@lordofthelake
Copy link
Contributor Author

lordofthelake commented Apr 29, 2020

@connectdotz I took a super quick stab at it. I see the build failing, but from the log it seems like it is Danger having some trouble posting its comment (and is lying about the email addresses not being verified) – any insight about that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants