summaryrefslogtreecommitdiff
path: root/cli/tests/testdata
diff options
context:
space:
mode:
Diffstat (limited to 'cli/tests/testdata')
-rw-r--r--cli/tests/testdata/test/doc_only.out5
-rw-r--r--cli/tests/testdata/test/doc_only/mod.ts10
2 files changed, 15 insertions, 0 deletions
diff --git a/cli/tests/testdata/test/doc_only.out b/cli/tests/testdata/test/doc_only.out
new file mode 100644
index 000000000..c2a91cae7
--- /dev/null
+++ b/cli/tests/testdata/test/doc_only.out
@@ -0,0 +1,5 @@
+Check [WILDCARD]/test/doc_only/mod.ts$2-5.ts
+running 0 tests from [WILDCARD]/test/doc_only/mod.ts
+
+test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out ([WILDCARD])
+
diff --git a/cli/tests/testdata/test/doc_only/mod.ts b/cli/tests/testdata/test/doc_only/mod.ts
new file mode 100644
index 000000000..467d850a2
--- /dev/null
+++ b/cli/tests/testdata/test/doc_only/mod.ts
@@ -0,0 +1,10 @@
+/**
+ * ```ts
+ * import "./mod.ts";
+ * ```
+ */
+Deno.test("unreachable", function () {
+ throw new Error(
+ "modules that don't end with _test are scanned for documentation tests only should not be executed",
+ );
+});