deno/tests/specs/run/run_coverage/foo.ts
Yoshiya Hinosawa 56d7660ee4
feat(cli): add --coverage flag to deno run command (#29329)
closes #16440

This PR adds `--coverage` flag to `deno run` command. When the flag is
specified, it generates the coverage profile in the directory specified
(default is `coverage`). The coverage directory can also be specified
from the env var `DENO_COVERAGE_DIR`.

---------

Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2025-06-25 13:34:30 +02:00

17 lines
229 B
TypeScript

function foo(a: number, b: number) {
if (a > 0) {
console.log(a);
} else {
console.log(a);
}
if (b > 0) {
console.log(b);
} else {
console.log(b);
}
}
const [a = 0, b = 0] = Deno.args;
foo(+a, +b);