0
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-03-10 14:17:49 -04:00
deno/tests/specs/coverage
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
..
filter_doc_testing_urls fix(coverage): ignore urls from doc testing (#25736) 2024-09-20 15:04:22 +09:00
invalid_url fix(coverage): exclude scripts with invalid URLs from raw coverage output (#28210) 2025-02-20 23:23:43 +01:00
no_files_after_filter fix(coverage): Error if no files are included in the report (#22952) 2024-03-15 20:58:57 -07:00
no_files_found chore: move more tests away from itest (#22909) 2024-03-15 15:46:51 -04:00