Skip to content

spawn test compare

Usage

spawn test compare <name>

Runs tests and compares their output against saved expected results, reporting any differences.

  • <name> — Specific test to compare.

For each test:

  1. Runs the test and captures output
  2. Compares output to the expected file in the test directory
  3. Reports differences (if any)

Use spawn test expect to update the expected output.

test compare always masks secret() values so real secrets cannot appear in test output or diffs. See the Secrets guide for details.

Terminal window
spawn test compare user-creation

Options

Option Description
-e, --environment <name> Override the environment for the target config.
--target <name> Select which target from spawn.toml to use.
--config-file <path> Path to config file. Defaults to spawn.toml.
-d, --debug Turn on debug output.