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

Tests that run fine in CLI won't run in editor #67

Open
nobleach opened this issue Nov 20, 2024 · 0 comments
Open

Tests that run fine in CLI won't run in editor #67

nobleach opened this issue Nov 20, 2024 · 0 comments

Comments

@nobleach
Copy link

I'm noticing that my test suite runs fine from the terminal. But when I try to trigger tests in NeoVim, I get errors like:

Vitest caught 1 unhandled error during the test run.
This might cause false positive tests. Resolve unhandled errors to make sure your tests are not affected.

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Unhandled Error ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Error: Cannot find package 'jsdom' imported from /Users/jim.wharton/.local/share/mise/installs/node/22.10.0/lib/node_modules/vitest/dist/chunks/index.lVXYBqEP.js

That would indicate that it's trying to import jsdom from my global nodejs install wouldn't it? Why would that be the norm? Shouldn't it use the local node_modules folder for test dependencies? Perhaps I'm just misreading this?

Regardless, I don't know where to start hunting to figure out why this test runs just fine via running vitest manually from the CLI.

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

No branches or pull requests

1 participant