firsttris / vscode-jest-runner

Simple way to run or debug one or more tests from context menu, codelens or command plalette
https://marketplace.visualstudio.com/items?itemName=firsttris.vscode-jest-runner
MIT License
265 stars 124 forks source link

Tips for using with bun? #338

Closed benjick closed 6 months ago

benjick commented 10 months ago

Hey

I'm wondering if anyone has gotten this to work well with bun test yet? I can't get it to just run the test I'm actually clicking run on, and I keep having to start it manually from the command line

Sorry for raising an "issue" but I couldn't think of a better-suited place to post Cheers

firsttris commented 10 months ago

there are certain places in the source where node is used. https://github.com/firsttris/vscode-jest-runner/blob/master/src/jestRunner.ts#L171 https://github.com/firsttris/vscode-jest-runner/blob/master/src/util.ts#L89

maybe its possible i dont know.

havent used bun yet.

best regards tristan

firsttris commented 10 months ago

you can clone the repo change the code and start extension in development mode: https://github.com/firsttris/vscode-jest-runner#steps-to-run-extension-in-development-mode

victmo commented 6 months ago

A few months later, but an alternative is to set jestrunner.jestCommand in your project settings to bun test and the extension will use Bun.

path/to/project/.vscode/settings.json

{
  "jestrunner.jestCommand": "bun test"
}