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/test_coverage.out10
-rw-r--r--cli/tests/test_coverage.ts5
3 files changed, 21 insertions, 0 deletions
diff --git a/cli/tests/integration_tests.rs b/cli/tests/integration_tests.rs
index 402268dd1..b58469640 100644
--- a/cli/tests/integration_tests.rs
+++ b/cli/tests/integration_tests.rs
@@ -2348,6 +2348,12 @@ itest!(proto_exploit {
output: "proto_exploit.js.out",
});
+itest!(deno_test_coverage {
+ args: "test --coverage --unstable test_coverage.ts",
+ output: "test_coverage.out",
+ exit_code: 0,
+});
+
itest!(deno_lint {
args: "lint --unstable lint/file1.js lint/file2.ts lint/ignored_file.ts",
output: "lint/expected.out",
diff --git a/cli/tests/test_coverage.out b/cli/tests/test_coverage.out
new file mode 100644
index 000000000..85e229881
--- /dev/null
+++ b/cli/tests/test_coverage.out
@@ -0,0 +1,10 @@
+[WILDCARD]
+running 1 tests
+test returnsHiSuccess ... ok ([WILDCARD])
+
+test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out ([WILDCARD])
+
+test coverage:
+file://[WILDCARD]/cli/tests/subdir/mod1.ts 57.143%
+file://[WILDCARD]/cli/tests/subdir/subdir2/mod2.ts 50.000%
+file://[WILDCARD]/cli/tests/subdir/print_hello.ts 50.000%
diff --git a/cli/tests/test_coverage.ts b/cli/tests/test_coverage.ts
new file mode 100644
index 000000000..72844422f
--- /dev/null
+++ b/cli/tests/test_coverage.ts
@@ -0,0 +1,5 @@
+import { returnsHi } from "./subdir/mod1.ts";
+
+Deno.test("returnsHiSuccess", function () {
+ returnsHi();
+});