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

Deno Support #528

Open
4 tasks done
lishaduck opened this issue Nov 13, 2024 · 1 comment
Open
4 tasks done

Deno Support #528

lishaduck opened this issue Nov 13, 2024 · 1 comment
Labels
p2-nice-to-have Not breaking anything but nice to have (priority)

Comments

@lishaduck
Copy link

lishaduck commented Nov 13, 2024

Clear and concise description of the problem

I use Deno (sometimes) and I also use Vitest (sometimes). As of very recently, I can use them both. However, the vscode extension still uses Node.js to invoke Vitest, so the vitest cli crashes, and the while extension detects tests, they're all grey and won't run.

I'd be more than willing to test a PR. I'd also be willing to write one, but I don't foresee having the time to write one any time soon, so don't expect anything tomorrow 🙃

Suggested solution

Detect if there's a deno.json file (or, perhaps, read the deno.enabled vscode setting?), and run deno run ./node_modules/vitest instead of node run ./node_modules/vitest (the tricky thing is that deno doesn't have a node_modules folder by default, but requiring one seems reasonable to me).

Alternative

Don't officially support Deno.

Additional context

I usually have chose between Vitest and Deno, but, given the status of denoland/deno#23882, I was trying it out. It works great! (except for coverage, which should be fixed in the next Deno release)

Validations

@sheremet-va
Copy link
Member

Feel free to open a PR. You can probably reuse the ws channel: https://github.com/vitest-dev/vscode/blob/main/src/api/ws.ts

@sheremet-va sheremet-va added p2-nice-to-have Not breaking anything but nice to have (priority) and removed enhancement: pending triage labels Nov 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p2-nice-to-have Not breaking anything but nice to have (priority)
Projects
None yet
Development

No branches or pull requests

2 participants