Skip to main content
Version: 3.x

CLI

The corde command line runner has several useful options. Some of the options shown below can also be used together to run tests exactly the way you want. Some one of Corde's Configuration options can also be specified through the CLI.

We are working to make all the configuration options available in CLI.

Running from the command line

Run all tests (default):

corde

Run only the tests that were specified with a pattern or filename:

corde path/to/test.js
info

You can run corde --help to view all available options.

Available Commands

--config

Alias: -c

Set config file path for the next execution. I.E:

corde --config ../corde.config.js

--files

Alias: -f

Set the path for all tests. Use this if you wan to specify a single path. for Array, use only corde path1 path2

corde --files ./tests/test1.js

Using alias:

corde -f ./tests/test1.js ./tests/test2.js
note

This is also a "anonymous" command. It means that you can just pass the files path without use -f or
--files. I.E:

corde ./tests/test1.js

--init

Alias: -i
Default: json
Options: js json ts

Initialize a config (corde.config.*) file. The available file formats are: .js, .json, .ts.

corde --init js

--validate

Alias: -v

Search for corde configs and check if all required data is setted. Also check if file paths are valid. This does not check if tokens are valid.

corde --validate