Skip to main content

Module snapshots

Module snapshots 

Source
Expand description

#2842: the project’s snapshots/ folder — one <suite file>.snap.json per suite file that takes a snapshot (expect v matches snapshot "name").

The compiler stays disk-free: the driver lists this folder with read_snapshot_files and hands the files’ text to the build, which inlines each into its test module. Only the driver writes them (bynk test --update-snapshots).

Constants§

PROJECT_SNAPSHOTS_DIR
The project’s snapshots folder, relative to the project root.
SNAPSHOT_SUFFIX
The extension a snapshot file carries after its suite file’s name.

Functions§

read_snapshot_files
Every *.snap.json under <root>/snapshots/, keyed by its project-relative path with / separators, with its text. A missing folder is empty; an unreadable file is an error.
snapshot_path
The snapshot file for the suite file at identity (its project-relative path): snapshots/<path without .bynk>.snap.json, with / separators.