Skip to content

Usage

Leste provides a CLI interface for running tests using the testing framework.

Command Syntax

leste [options] [file/folder...]

Arguments

  • file: File (or files) with tests to run.
  • folder: Folder (or folders) to find tests, default is ./tests.

Options

Flag Description Default
-d, --disable-color Disable color for the output, print raw text. false
-h, --help Show the usage message and exit. —
-v, --verbose Display output of print/io.write calls inside tests. false
-x, --exitfirst Exit on the first failure. false

Short flags can also be combined, e.g. leste -vx runs verbosely and stops on the first failure.

Examples

Run tests located in the default ./tests folder with verbose output:

leste -v

Run tests located in a specific folder:

leste my_tests_folder

Stop the tests after the first failure:

leste -x

Disable colors in the output:

leste -d

Exit Codes

Leste exits with status 0 when every test passes, and a non-zero status otherwise — safe to rely on in CI pipelines.

Next Steps

Continue to Writing Tests to create your first test suite.