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

Support for Bun #1064

Open
ffMathy opened this issue Sep 10, 2023 · 4 comments
Open

Support for Bun #1064

ffMathy opened this issue Sep 10, 2023 · 4 comments
Labels
external-dependency has dependency on external issues/fixes

Comments

@ffMathy
Copy link

ffMathy commented Sep 10, 2023

I think it would be great if this extension had support for Bun's test runner.

@larsw
Copy link

larsw commented Sep 14, 2023

I had hoped that setting jestCommandLine to bun test or bun test -- would work, but it doesn't :-(

@connectdotz
Copy link
Collaborator

do you have a sample repo we can try? what was the error you are seeing?

@ffMathy
Copy link
Author

ffMathy commented Sep 14, 2023

I think the issue is that the bun test CLI does not simulate the same arguments as jest CLI does.

The arguments are named differently etc.

I filed an issue here:
oven-sh/bun#4562

The way I see it, we have four options.

  1. We make this extension also support Bun. While enticing, it doesn't feel right, since Bun's test CLI technically shares nothing in similarity with Jest.
  2. We wait until Bun fixes the above linked issue.
  3. Someone makes a CLI wrapper that translates a Jest commandline into a Bun commandline. So something that acts as an adapter.
  4. We wait until Bun implements their own test runner extension. This has been confirmed by them, but no ETA has been given.

@connectdotz
Copy link
Collaborator

This extension does rely on some jest features, such as the --json, --reporters, --listTests, and --coverage, to name a few. Many of them didn't seem to be supported by Bun right now, so a simple adaptor is most likely not going to work...

It seems for this extension to support Bun, Bun would first need to reach feature parity in regard to these features. It might never happen, as @ffMathy said, Bun test is technically different from jest. In that case, I think it is best to use Bun's native extension instead.

@connectdotz connectdotz added the external-dependency has dependency on external issues/fixes label Sep 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
external-dependency has dependency on external issues/fixes
Projects
None yet
Development

No branches or pull requests

3 participants