Bun’s test runner supports Jest-style snapshot testing viaDocumentation Index
Fetch the complete documentation index at: https://bun.com/docs/llms.txt
Use this file to discover all available pages before exploring further.
.toMatchSnapshot().
The first time this test is executed, Bun will write a snapshot file to disk in a directory called
__snapshots__ that lives alongside the test file.
File Tree
To regenerate snapshots, use the
--update-snapshots flag.
terminal
See Docs > Test Runner > Snapshots for complete documentation on snapshots with the Bun test runner.