spawn test compare
Usage
spawn test compare <name> Runs tests and compares their output against saved expected results, reporting any differences.
Arguments
Section titled “Arguments”<name>— Specific test to compare.
Behavior
Section titled “Behavior”For each test:
- Runs the test and captures output
- Compares output to the
expectedfile in the test directory - Reports differences (if any)
Use spawn test expect to update the expected output.
Secrets
Section titled “Secrets”test compare always masks secret() values so real secrets cannot appear in test output or diffs. See the Secrets guide for details.
Example
Section titled “Example”spawn test compare user-creationOptions
| 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. |