summaryrefslogtreecommitdiff
path: root/cli/tests
diff options
context:
space:
mode:
Diffstat (limited to 'cli/tests')
-rw-r--r--cli/tests/integration_tests.rs6
-rw-r--r--cli/tests/subdir/comment.ts4
-rw-r--r--cli/tests/test_comment_coverage.out7
-rw-r--r--cli/tests/test_comment_coverage.ts5
4 files changed, 22 insertions, 0 deletions
diff --git a/cli/tests/integration_tests.rs b/cli/tests/integration_tests.rs
index 80a7222e5..be7bb63c5 100644
--- a/cli/tests/integration_tests.rs
+++ b/cli/tests/integration_tests.rs
@@ -3437,6 +3437,12 @@ itest!(deno_test_coverage {
exit_code: 0,
});
+itest!(deno_test_comment_coverage {
+ args: "test --coverage --unstable test_comment_coverage.ts",
+ output: "test_comment_coverage.out",
+ exit_code: 0,
+});
+
itest!(deno_test_branch_coverage {
args: "test --coverage --unstable test_branch_coverage.ts",
output: "test_branch_coverage.out",
diff --git a/cli/tests/subdir/comment.ts b/cli/tests/subdir/comment.ts
new file mode 100644
index 000000000..ea7e630c0
--- /dev/null
+++ b/cli/tests/subdir/comment.ts
@@ -0,0 +1,4 @@
+// This is a comment.
+export function comment(): string {
+ return "comment";
+}
diff --git a/cli/tests/test_comment_coverage.out b/cli/tests/test_comment_coverage.out
new file mode 100644
index 000000000..582152fa1
--- /dev/null
+++ b/cli/tests/test_comment_coverage.out
@@ -0,0 +1,7 @@
+[WILDCARD]/tests/$deno$test.ts
+running 1 tests
+test comment ... ok ([WILDCARD])
+
+test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out ([WILDCARD])
+
+[WILDCARD]/tests/subdir/comment.ts ... 100.000% (4/4)
diff --git a/cli/tests/test_comment_coverage.ts b/cli/tests/test_comment_coverage.ts
new file mode 100644
index 000000000..28a25c65d
--- /dev/null
+++ b/cli/tests/test_comment_coverage.ts
@@ -0,0 +1,5 @@
+import { comment } from "./subdir/comment.ts";
+
+Deno.test("comment", function () {
+ comment();
+});