Open ffMathy opened 1 year ago
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.
@drk-mtr great work and discovery. I mean, even tests without coverage could be a fine start with a known limitation. Could you create a PR for this?
Thanks but unfortunately the code I was playing with does nothing useful. It finds tests but it can't run them or report on the results.
Are there any updates yet? Is anyone working on this? As projects getting larger running und debugging individual tests are not convenient but necessary. Keyboard shortcuts would speed up development a lot.
@Kleywalker doesn't look like it's being worked on. It's also not on Bun's updated roadmap 😦
I would suggest that this single issue is one of the major user adoption hurdles. This needs a high priority.
I agree. Any official comment from the Bun team would be nice. I won't adopt Bun before this is ready.
Looking forward for this 👀
Remember to give it a thumbs up reaction in the main post (not as a comment). I think that's how they prioritize.
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