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

[FEATURE] Bun support #452

Open
robertherber opened this issue Feb 11, 2024 · 4 comments
Open

[FEATURE] Bun support #452

robertherber opened this issue Feb 11, 2024 · 4 comments
Labels
good first issue Good for newcomers help wanted Extra attention is needed

Comments

@robertherber
Copy link

I'm trying to get a test suite running with Bun, but it seems to use node and jest no matter what I do. Feels like the wiring is under the hood and not configurable. It would be great to be able to run Reassure with Bun :)

@mdjastrzebski
Copy link
Member

I do not have too much knowledge about bun.

I've got some questions we could start with:

  • What command do you use in bun to run tests
  • Does bun uses any form of JIT?
  • Can you disable JIT in any way: CLI option, vm object call, etc?

@robertherber
Copy link
Author

robertherber commented Feb 11, 2024

I only know the answer to the first question - bun test :)

Expo for example is fully supporting Bun with all its tools now, and I get the feeling they're almost recommending it because of it's speed and reduced need for tooling.

Similarly to jest you can specify a test setup file, either with a --preload flag or in a bunfig.toml file.

Hopefully it's just a matter of being able to specify bun as the test runner instead of jest :)

Note that it supports TypeScript and ESM seamlessly, so that takes away a lot of complexity.

@mdjastrzebski mdjastrzebski added the help wanted Extra attention is needed label Mar 8, 2024
@mdjastrzebski
Copy link
Member

This issue could/should be implemented in 2 phases:

  • Add support for bun install (bun as a package manager) - relative simple
  • Add support for bun test (bun a a test runner) - more complex

@mdjastrzebski mdjastrzebski added the good first issue Good for newcomers label Jun 17, 2024
@V3RON
Copy link

V3RON commented Aug 7, 2024

@mdjastrzebski
I gave it a try—I created a Vite project powered by Bun, installed Reassure with Jest, and ran it without any issues.

However, at least two problems are stopping me from running Reassure in the Bun runtime:
a) the test runner currently doesn't offer an option to customize test file patterns
b) bun's runtime performance isn't highly customizable.

It's fairly easy to make the changes needed to run Reassure in the Bun test environment, but performance may vary (runtime optimizations).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants