exitCode
Check the exit code of a CLI command. Programs return 0 when they succeed and a non-zero number when they fail. This is the CLI equivalent of checking an HTTP status code.
assertions:
- exitCode:
equals: 0
# Useful for testing error handling
assertions:
- exitCode:
equals: 1
Only works with
executor: cli tests. For HTTP tests, use statusCode instead.