Commit graph

13 commits

Author SHA1 Message Date
Bartek Iwańczuk
c50b37c234
test: fix specs::coverage::data_url test (#29865) 2025-06-24 16:22:28 +05:30
Boye Lillejord-Nygård
5b65313d48
fix(coverage): Make output table markdown compatible (#29533)
This changes the format of the table outputted by `deno coverage` to be
markdown compatible.

Related #29532 
Closes #29465
2025-06-24 11:27:07 +02:00
Yoshiya Hinosawa
e5b96243ac
test: fix flakiness of specs::coverage::data_url (#29760) 2025-06-17 10:54:44 +09:00
Simon Lecoq
97a38fa584
fix(coverage): deno test --coverage fails when importing modules from data: urls (#29607)
Some checks are pending
ci / pre-build (push) Waiting to run
ci / test debug linux-aarch64 (push) Blocked by required conditions
ci / test release linux-aarch64 (push) Blocked by required conditions
ci / test debug macos-aarch64 (push) Blocked by required conditions
ci / test release macos-aarch64 (push) Blocked by required conditions
ci / bench release linux-x86_64 (push) Blocked by required conditions
ci / lint debug linux-x86_64 (push) Blocked by required conditions
ci / lint debug macos-x86_64 (push) Blocked by required conditions
ci / lint debug windows-x86_64 (push) Blocked by required conditions
ci / test debug linux-x86_64 (push) Blocked by required conditions
ci / test release linux-x86_64 (push) Blocked by required conditions
ci / test debug macos-x86_64 (push) Blocked by required conditions
ci / test release macos-x86_64 (push) Blocked by required conditions
ci / test debug windows-x86_64 (push) Blocked by required conditions
ci / test release windows-x86_64 (push) Blocked by required conditions
ci / build wasm32 (push) Blocked by required conditions
ci / publish canary (push) Blocked by required conditions
2025-06-05 13:42:10 +09:00
Asher Gomez
f9bb8241ca
fix(coverage): HTML validation errors in coverage explorer (#29497)
Closes #29493
2025-05-29 09:48:11 +02:00
Bartek Iwańczuk
2fe200f6ef
fix(coverage): don't panic if all covered files are ignored via directive (#29250)
Closes https://github.com/denoland/deno/issues/29218
2025-05-12 02:47:32 +02:00
Yoshiya Hinosawa
83f15ece09
feat(test): create coverage reports when --coverage specified in deno test (#28260)
This PR updates the behavior of `deno test --coverage` option. Now if
`--coverage` option is specified, `deno test` command automatically
shows summary report in the terminal, and generates the lcov report in
`$coverage_dir/lcov.info` and html report in `$coverage_dir/html/`

This change also adds `--coverage-raw-data-only` flag, which prevents
the above reports generated, instead only generates the raw json
coverage data (which is the same as current behavior)
2025-04-18 18:56:14 +09:00
Yoshiya Hinosawa
202f5f3910
feat(test): support DENO_COVERAGE_DIR env var (#28291)
This PR adds support of `DENO_COVERAGE_DIR` for controlling coverage
output.
2025-04-16 12:47:28 -04:00
Ben Heidemann
f465961964
feat(coverage): add coverage ignore comments (#26590) 2025-04-15 17:56:55 +00:00
Nathan Whitaker
e5de22b0b5
fix(coverage): exclude scripts with invalid URLs from raw coverage output (#28210)
Fixes https://github.com/denoland/deno/issues/28206.

Basically if you execute a script with `node:vm`, this produces a
"script" with the file name `evalmachine.<anonymous>`, which ends up
producing coverage like

```json
{
  "scriptId": "319",
  "url": "evalmachine.<anonymous>",
  "functions": [
    {
      "functionName": "",
      "ranges": [{ "startOffset": 0, "endOffset": 18, "count": 1 }],
      "isBlockCoverage": true
    }
  ]
}
```

We assume that the `url` field here (the specifier of the script) is a
valid URL, and so we error out when processing that coverage.

There are two potential fixes: either don't write the coverage files for
those scripts, or ignore the errors when we process the data. I went
with the former here.
2025-02-20 23:23:43 +01:00
Yoshiya Hinosawa
66fb81ea85
fix(coverage): ignore urls from doc testing (#25736) 2024-09-20 15:04:22 +09:00
Nathan Whitaker
ab67b4c645
fix(coverage): Error if no files are included in the report (#22952)
Fixes #22941.

In that case, the only file with coverage was the `test.ts` file. The
coverage reporter filters out test files before compiling its report, so
after filtering we were left with an empty set of files. Later on it's
assumed that there is at least 1 file to be reported on, and we panic.
Instead of panicking, just issue an error after filtering.
2024-03-15 20:58:57 -07:00
David Sherret
e40f9a5c14
chore: move more tests away from itest (#22909)
Part of #22907
2024-03-15 15:46:51 -04:00