namaka 0.1.0

Snapshot testing tool for Nix based on haumea
namaka-0.1.0 is not a library.

namaka

release version deps license ci

Snapshot testing tool for Nix based on [haumea]

nix shell github:nix-community/namaka
namaka check # run checks
namaka review # review pending snapshots

Usage

Usage: namaka <COMMAND>

Commands:
  check   Wrapper around `nix flake check` to prepare snapshots for failed tests [aliases: c]
  review  Review pending snapshots and selectively accept or reject them [aliases: r]
  help    Print this message or the help of the given subcommand(s)

Options:
  -h, --help     Print help
  -V, --version  Print version

load

Type: { flake, dir?, ... } -> { ... }

Arguments:

  • flake : Path

    Path to the Nix flake.

  • (optional) dir : String

    Path to the testing directory relative to flake, defaults to tests. ${flake}/${dir} to haumea.load's src option.

Wrapper around haumea.load to loads snapshot tests from a directory. See tests for how the directory should be structured. Ignore the _snapshots, as it will be generated by namaka.

The rest of the arguments are passed directory to haumea.load, with the exception of src, which always gets overwritten (ignored).

Related Tools

  • Namaka is largely inspired by insta, a snapshot testing tool for Rust.
  • Namaka is based on [haumea], which also has some testing functionalities.