Skip to content

spawn test new

Usage

spawn test new <name>

Creates a new test directory with a template test.sql file.

  • <name> — A descriptive name for the test

Creates a directory at tests/<name>/ with a test.sql template for writing SQL test scenarios.

To use your own starting content instead of the default template, set template_test in spawn.toml to a path (relative to spawn_folder) of a file to copy into test.sql.

tests/user-creation/test.sql
spawn test new 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.