From 5b2caed7fd928fa80e31be47edf0bd73a1b2c1cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Mon, 18 Dec 2023 11:43:27 +0100 Subject: fix(coverage): error if no files found (#21615) This commit fixes a panic in `deno coverage` command if the file to be covered doesn't produce any coverage data. Fixes https://github.com/denoland/deno/issues/21580 --- cli/tests/integration/coverage_tests.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'cli/tests/integration') diff --git a/cli/tests/integration/coverage_tests.rs b/cli/tests/integration/coverage_tests.rs index 4c7a51f4e..497d67890 100644 --- a/cli/tests/integration/coverage_tests.rs +++ b/cli/tests/integration/coverage_tests.rs @@ -630,3 +630,9 @@ File | Branch % | Line % | ", ); } + +itest!(no_files_found { + args: "coverage doesnt_exist.js", + exit_code: 1, + output: "coverage/doesnt_exist.out", +}); -- cgit v1.2.3