Description
The DENO_UNSTABLE_COVERAGE_DIR
is the environment variable that actually controls if coverage collection takes place or not. It has a terrible name and is not documented anywhere as it is not considered public at the moment.
Using an environment variable is the most common way to determine if coverage should be collected and where it should be collected too.
This implies that we remove deno test --coverage
which was kept for backwards compatibility in 1.x.
The removal of the coverage flag would probably have to be a 2.0 change.
Usage would be:
export DENO_COVERAGE_DIR="some/path"
deno run ...
deno test ...
deno test ...
deno coverage --lcov > cov.lcov