---
title: "Bun v0.5.8"
description: "Bun v0.5.8 adds Jest-compatible snapshot testing to bun test via expect().toMatchSnapshot(), with --update-snapshots and a --rerun-each flag for reproducing flaky tests."
url: "https://swe.quest/articles/bun-v0-5-8-2656173dc4d056ee"
canonical: "https://bun.com/blog/bun-v0.5.8"
source: "Bun"
published: "2023-03-18"
difficulty: "medium"
kind: "Release"
reading_minutes: 8
tags: ["javascript","runtimes","testing"]
---

# Bun v0.5.8

A post on [Bun](https://swe.quest/sources/bun.md), published 2023-03-18, 8 min read, Release. Original: [https://bun.com/blog/bun-v0.5.8](https://bun.com/blog/bun-v0.5.8)

## Summary

Bun v0.5.8 adds Jest-compatible snapshot testing to bun test via expect().toMatchSnapshot(), with --update-snapshots and a --rerun-each flag for reproducing flaky tests. A new --preload flag (or bunfig.toml preload list) runs setup files such as Bun.plugin() loaders before scripts and tests, and bun install workspaces now accept a trailing /\* glob. Web API fixes bring Request/Response null-body handling, blob.slice content types and Request constructor validation in line with Chrome and Safari. Node.js compatibility work covers Buffer, os.cpus on macOS, os.networkInterfaces and AbortSignal in http, and Bun.sleepSync now takes milliseconds, a breaking change.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [JavaScript](https://swe.quest/tags/javascript.md) (Languages)
- [Runtimes & VMs](https://swe.quest/tags/runtimes.md) (Compilers & runtimes)
- [Testing](https://swe.quest/tags/testing.md) (Engineering practices)

## Prerequisites

- JavaScript runtimes ([easy posts on JavaScript](https://swe.quest/tags/javascript.md?difficulty=easy))
- Jest testing ([easy posts on Testing](https://swe.quest/tags/testing.md?difficulty=easy))

## Keywords

Bun, bun test, Jest, bunfig.toml, Node.js, Fetch API

## Related posts

- [Bun v1.3.1](https://swe.quest/articles/bun-v1-3-1-ee365f019ab94793.md): Bun · 2025-10-22 · Medium · 9 min read · JavaScript, Runtimes & VMs, Build systems, Testing, Developer tools
  Bun v1.3.1 makes \`bun build\` up to 2x faster for symlink-heavy projects (isolated linker, pnpm).
- [Bun v0.5.7](https://swe.quest/articles/bun-v0-5-7-7d41c9ef8c53cf1e.md): Bun · 2023-02-24 · Medium · 6 min read · JavaScript, Runtimes & VMs, Testing
  Bun v0.5.7 adds Web-standard FormData (with response.formData() benchmarked 25x faster than Node v19.6.0 and 4x faster than Deno), git dependencies in package.json and bun install, and AbortSignal support for fetch() and incoming server requests. setTimeout() now returns a Node.js-style Timeout object with ref()/unref() that still coerces to a number, chosen for npm compatibility. bun wiptest graduates to bun test with pretty-printed diffs and auto-imported Jest globals, alongside new Set methods, an AWS Lambda runtime layer that maps events to Request objects, and an official setup-bun GitHub Action.
- [Bun v1.2.16](https://swe.quest/articles/bun-v1-2-16-2fbfbd468574713c.md): Bun · 2025-06-11 · Medium · 5 min read · JavaScript, Runtimes & VMs
  Bun v1.2.16 fixes 73 issues and adds 119 passing Node.js tests.
- [Bun v0.2.0](https://swe.quest/articles/bun-v0-2-0-c0c3775be874dec7.md): Bun · 2022-10-13 · Medium · 5 min read · JavaScript, Runtimes & VMs, Performance engineering
  Bun v0.2.0 adds \`bun --hot\` for server-side hot reloading that preserves global state and in-flight HTTP requests, \`Bun.spawn\`/\`Bun.spawnSync\` for process spawning with flexible stdin sources and ReadableStream output, and streaming request bodies in \`Bun.serve\`.
- [Bun v1.0.2](https://swe.quest/articles/bun-v1-0-2-94701c44659f16c6.md): Bun · 2023-09-15 · Medium · 7 min read · JavaScript, Runtimes & VMs
  Bun v1.0.2 makes \`bun --watch\` reload immediately instead of enqueuing a reload task behind blocking work on the event loop, and makes \`bunx package@latest\` always query the npm registry rather than reuse a cached copy in /tmp.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
