View Source NLdoc.Test.Snapshot (NLdoc.Test v1.1.0)
This module provides snapshot testing functionality for ExUnit tests.
Summary
Functions
Asserts that the actual value matches the expected value saved in a snapshot file.
The actual value is always saved (inspect/2 with pretty: true) to a file named actual.exs
.
Types
Functions
Asserts that the actual value matches the expected value saved in a snapshot file.
The actual value is always saved (inspect/2 with pretty: true) to a file named actual.exs
.
Options
:save_expected
- Save the actual value as the expected value for the snapshot. This overwrites the existing expected value.:format
- Format the actual value in specific format. Currently supports:exs
and:json
.
@spec save_snapshot(any(), String.t(), destination(), filetype()) :: :ok
@spec snapshot_path(String.t(), destination(), filetype()) :: String.t()