bun
bun copied to clipboard
Test runner in VS Code extension
What is the problem this feature would solve?
Bun tests can only be run from the CLI.
What is the feature you are proposing to solve the problem?
A VS Code extension could integrate the tests with the test explorer.
What alternatives have you considered?
No response
maybe configure jest extension to run with bun
That's what #4562 proposes.
We are working on a VSCode extension and it will have test runner support.
@Electroid great. Is there a way to track its progress somehow? Is the work being done on a particular branch?
And is it possible to provide some sort of ETA on when we can expect this? Eagerly waiting. Bun is awesome.
@Electroid great. Is there a way to track its progress somehow? Is the work being done on a particular branch?
And is it possible to provide some sort of ETA on when we can expect this? Eagerly waiting. Bun is awesome.
You can test it out here. Note that it does not have test support yet, but you can use the debugger. The code for the extension is in the packages/bun-vscode
directory.
@Electroid is there an issue tracking test support yet? Or is this the issue?
This would be a big deal for me in terms of adoption.
I tried bun out after updating some node dependencies and running into another ESM/CJS issue but would hate to give up the really clean test-runner integration.
Is there a roadmap? Using test runner would increase productivity immensely! Especially run test at cursor
and rerun previous test
including keyboard shortcuts!
@Jarred-Sumner just one quick word on an ETA or if this is a priority in 2024? I don't see it on the roadmap. Is this intentional?
Is there anyway to achieve this functionality with the release of Bun 1.1 now that it has additional test framework support? (reconfigure any of the current vscode test runner plugins to use bun?)
This would be a great addition.
Is there anyway to achieve this functionality with the release of Bun 1.1 now that it has additional test framework support? (reconfigure any of the current vscode test runner plugins to use bun?)
Getting the node:test runner library to discover tests is a two line change, but I wouldn't know how to integrate the reporting aspect.
I wonder whether this could be done in two stages: for now, use this discovery to run a command in the terminal, then add proper integration with the Testing API UI later. Though I guess this isn't a big step up from using the existing Bun: Run File
functionality.