---
title: "Bun v0.6.13"
description: "Bun v0.6.13 adds Date mocking in bun test via setSystemTime, which affects Date.now(), new Date() and Intl.DateTimeFormat without mutating the Date object as Jest does."
url: "https://swe.quest/articles/bun-v0-6-13-5f1989130c08b5c9"
canonical: "https://bun.com/blog/bun-v0.6.13"
source: "Bun"
published: "2023-07-04"
difficulty: "medium"
kind: "Release"
reading_minutes: 5
tags: ["javascript","runtimes","testing","zig"]
---

# Bun v0.6.13

A post on [Bun](https://swe.quest/sources/bun.md), published 2023-07-04, 5 min read, Release. Original: [https://bun.com/blog/bun-v0.6.13](https://bun.com/blog/bun-v0.6.13)

## Summary

Bun v0.6.13 adds Date mocking in bun test via setSystemTime, which affects Date.now(), new Date() and Intl.DateTimeFormat without mutating the Date object as Jest does. Buffer.toString("base64") is 10x faster, and node:tls and node:net fixes make the postgres package work over TLS and let nodemailer send mail. HTTP requests use 8 fewer bytes each because their boolean fields now live in a Zig packed struct. The release also fixes WebSocket zero-length messages and initial-payload ordering races, adds isUtf8/isAscii, and corrects Buffer.toString overloads, workspace: dependencies and empty env vars.

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)
- [Zig](https://swe.quest/tags/zig.md) (Languages)

## Prerequisites

- Node.js APIs ([easy posts on JavaScript](https://swe.quest/tags/javascript.md?difficulty=easy))
- JavaScript testing ([easy posts on JavaScript](https://swe.quest/tags/javascript.md?difficulty=easy))

## Keywords

Bun, bun test, Zig, node:tls, WebSocket, nodemailer, HTMLRewriter

## Related posts

- [Bun v1.1.16](https://swe.quest/articles/bun-v1-1-16-73af18d20e38e0ab.md): Bun · 2024-06-23 · Medium · 6 min read · JavaScript, Runtimes & VMs, Testing, Build systems
  Bun v1.1.16 fixes 41 bugs and adds lcov output for \`bun test --coverage\`, configurable in bunfig.toml.
- [Bun v1.3.4](https://swe.quest/articles/bun-v1-3-4-fdb372d4f6ff0ddc.md): Bun · 2025-12-06 · Medium · 7 min read · JavaScript, Runtimes & VMs, Testing
  Bun 1.3.4 adds the URLPattern Web API (passing 408 Web Platform Tests), Jest-style fake timers in bun:test, custom proxy headers in fetch() and a %j console format specifier.
- [Bun v0.6.3](https://swe.quest/articles/bun-v0-6-3-6490ca20e0e273a3.md): Bun · 2023-05-22 · Medium · 6 min read · JavaScript, Runtimes & VMs, Testing, Build systems
  Bun v0.6.3 adds the node:vm module for running code in controlled JavaScript contexts and fixes node:tls and node:http so socket.io and mongodb authentication work. bun test gains test.todo(), toBeCloseTo(), per-test timeouts and lifecycle hooks via --preload.
- [Bun v1.2.10](https://swe.quest/articles/bun-v1-2-10-b151a5b1f4be88e2.md): Bun · 2025-04-17 · Medium · 5 min read · JavaScript, Runtimes & VMs, Performance engineering, Testing
  Bun v1.2.10 is mostly a bugfix release (33 fixes). It fixes a pathological setImmediate slowdown when non-timer I/O was pending (a 100-iteration loop drops from 74s to 4ms), which makes next build about 10% faster on macOS, and caches the 34 HTTP method strings so request.method no longer allocates.
- [Bun v1.0.10](https://swe.quest/articles/bun-v1-0-10-49e5b151965cc45d.md): Bun · 2023-11-07 · Medium · 5 min read · Runtimes & VMs, JavaScript, Performance engineering, Linux
  Bun v1.0.10 makes node:http 14% faster by building Node.js headers, rawHeaders and url strings directly in native code.

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)
