-
-
Notifications
You must be signed in to change notification settings - Fork 78
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
Auto previewing does not work when running a single test with WebStorm/IntelliJ #301
Comments
FWIW, I can work around the problem by adjusting
so that it references the correct
Clearly not a permanent fix, but it allows me to run tests from within IntelliJ IDEA. |
From my understanding, I think it has more to do with the fact that when we run a single test, IntelliJ will create an automatic run configuration using the closest directory where a In a case of a monorepo, it might be within Your fix hardcodes that path, but we need a way to globally configure the path so it says in |
I am currently experimenting here but have yet to come up with a valid PR |
I worked on adding a feature to specify the cache folder location in #305. |
Found this issue while working on #126.
When trying to run a single test using IntelliJ, a node_modules folder gets created within the directory instead of the project root. I went on the nx monorepo example project and ran the test with IntelliJ (Webstorm) to see the problem happening. Here is a short video recording:
Screencast.2023-06-01.11.12.34.mp4
I have yet to dig out why it does this but this is what I got so far.
Note: I ran
pnpm test
andpnpm test:watch
to see it work, it failed as soon as I tried to run the test with IntelliJ (running a single test)I rebased my example branch with main and have added a few things to my example branch here: main...srosato:jest-preview:nextjs-nx-example.
The command that gets run in the preview video is
/home/srosato/.nvm/versions/node/v16.18.1/bin/node --require /home/srosato/.local/share/JetBrains/Toolbox/apps/IDEA-U/ch-0/231.9011.34/plugins/javascript-impl/helpers/jest-intellij/lib/jest-intellij-stdin-fix.js /home/srosato/dev/third-party/jest-preview/examples/nextjs-nx/node_modules/jest/bin/jest.js --colors --reporters /home/srosato/.local/share/JetBrains/Toolbox/apps/IDEA-U/ch-0/231.9011.34/plugins/javascript-impl/helpers/jest-intellij/lib/jest-intellij-reporter.js --verbose --testNamePattern=^Index should render successfully$ --runTestsByPath /home/srosato/dev/third-party/jest-preview/examples/nextjs-nx/apps/app/specs/index.spec.tsx
although it is very specific to my machine, it can be reproduced by opening a free version of WebStorm/IntelliJOriginally posted by @srosato in #126 (comment)
The text was updated successfully, but these errors were encountered: