Skip to main content

One post tagged with "v0.12.0"

View All Tags

· 2 min read
Jesse Mitchell

Hey there!

This release introduces significant improvements to Pineapple to make development & testing a better experience for all.

Support for Bun

Pineapple's internals have been reworked to make it possible to use Bun as the test runner, which has some significant advantages:

  • It transpiles every file for you, making it simpler to test your TypeScript, JSX and Flow projects.
  • Runs on a modified version of JavaScriptCore, which in some cases runs faster than V8.
  • Has a quicker cold-start time, which is useful for continuous testing.

If you pass in the --bun flag while invoking Pineapple, the framework will opt to use it over the traditional Node.js runner.

Caveat Emptor: If you're testing projects that depend heavily on Node-specific APIs, Bun may not be the ideal runner for your use-case.

Continuous Testing

Prior to this release, Pineapple was a one-shot test runner; you'd invoke the program & it'd spit out test results.

While it was certainly possible to pair Pineapple with nodemon or chokidar CLI, this would likely run every test in your project, rather than just the ones you were affecting.

Using the --watch-mode or -w flag, you can run Pineapple in continuous testing mode, which will only run tests that could be impacted by your modifications. The runner will traverse the dependency chain & deduce which tests in files downstream need to be run.

An example of the snapshot functionality where the code is modified and the snapshot fails due to a renamed attribute

Video