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:
- Long
- Alias
corde --config ../corde.config.js
corde -c ../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
- Single Files
- Multiple Files
corde --files ./tests/test1.js
corde --files ./tests/test1.js ./tests/test2.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
.
- Long
- Alias
corde --init js
corde -i 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.
- Long
- Alias
corde --validate
corde -v