Skip to main content

Bun Support

Starting in v0.12.0, Pineapple can leverage Bun to run your tests.

Using the --bun flag will tell Pineapple that you'd prefer to run your tests through Bun.

This comes with some significant advantages:

  • Bun handles its own transpilation, and it does it quite quickly. This makes it much easier to work with TypeScript and JSX.
  • Bun uses a modified version JavaScriptCore, which is occasionally faster than V8. It also has a quicker cold-start time, which is useful for continuous mode (shaving off 80-100ms).

For a good chunk of projects, Bun might be a good fit as the test-runner for Pineapple.

As Bun is a newer project, it hasn't quite polyfilled a chunk of common Node APIs, so if the code you're looking to test depends heavily on those dependencies, you might opt to stick with the Node runner.