runner
runner copied to clipboard
New API for `configure.reporters` and `--reporters` argument
Linked to #23
Refactor
- Moved what is related to CLI parsing into its own file
- Moved what is related to configuration and configuration normalization to its own file
What has been added
- a
--reporters
arguments - New API for
configure.reporters
property, but backward compatible. theconfigure.reporters.defaults
property is typesafe and and based on whatconfigure.reporters.list
contains.
To keep the API retro-compatible, but also to keep the code simple, I made some functions to "normalize" the configuration. So even if the old API is used, then this function will convert that into the same format as the new one. ( with the defaults
and list
properties. )
If the old API is used, then all reporters are activated by default
The --reporters
flag overrides the reporters.defaults
property
To merge this PR it will be necessary in priority to merge this one: https://github.com/japa/core/pull/65 Then update @japa/core
Let me know if anything seems unclear or if anything needs to be changed