mirror of
https://github.com/denoland/deno.git
synced 2025-12-23 08:48:24 +00:00
fix(coverage): don't process coverage for blob: urls (#31035)
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 libs (push) Blocked by required conditions
ci / publish canary (push) Blocked by required conditions
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 libs (push) Blocked by required conditions
ci / publish canary (push) Blocked by required conditions
Fixes #31030.
This commit is contained in:
parent
568e247187
commit
0f81808c88
5 changed files with 32 additions and 0 deletions
|
|
@ -441,6 +441,7 @@ fn filter_coverages(
|
|||
.filter(|e| {
|
||||
let is_internal = e.url.starts_with("ext:")
|
||||
|| e.url.starts_with("data:")
|
||||
|| e.url.starts_with("blob:")
|
||||
|| e.url.ends_with("__anonymous__")
|
||||
|| e.url.ends_with("$deno$test.mjs")
|
||||
|| e.url.contains("/$deno$stdin.")
|
||||
|
|
|
|||
6
tests/specs/coverage/blob_url/__test__.jsonc
Normal file
6
tests/specs/coverage/blob_url/__test__.jsonc
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"tempDir": true,
|
||||
"args": "test --coverage main_test.ts",
|
||||
"output": "main.out",
|
||||
"exitCode": 0
|
||||
}
|
||||
12
tests/specs/coverage/blob_url/main.out
Normal file
12
tests/specs/coverage/blob_url/main.out
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
Check [WILDLINE]/main_test.ts
|
||||
running 1 test from ./main_test.ts
|
||||
test ... ok ([WILDLINE])
|
||||
|
||||
ok | 1 passed | 0 failed ([WILDLINE])
|
||||
|
||||
| File | Branch % | Line % |
|
||||
| --------- | -------- | ------ |
|
||||
| main.ts | 100.0 | 100.0 |
|
||||
| All files | 100.0 | 100.0 |
|
||||
Lcov coverage report has been generated at [WILDLINE]
|
||||
HTML coverage report has been generated at [WILDLINE]
|
||||
8
tests/specs/coverage/blob_url/main.ts
Normal file
8
tests/specs/coverage/blob_url/main.ts
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
export async function foo() {
|
||||
const { default: bar } = await import(
|
||||
URL.createObjectURL(
|
||||
new Blob(["export default 'bar'"], { type: "application/typescript" }),
|
||||
)
|
||||
);
|
||||
return bar;
|
||||
}
|
||||
5
tests/specs/coverage/blob_url/main_test.ts
Normal file
5
tests/specs/coverage/blob_url/main_test.ts
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
import { foo } from "./main.ts";
|
||||
|
||||
Deno.test("test", async () => {
|
||||
await foo();
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue