From 77ead8af20180453aa2d0db67d7856641bd5498f Mon Sep 17 00:00:00 2001 From: Casper Beyer Date: Wed, 1 Sep 2021 17:31:56 +0800 Subject: fix(cli): retain path based test mode inference (#11878) --- cli/tests/testdata/test/doc_only.out | 5 +++++ cli/tests/testdata/test/doc_only/mod.ts | 10 ++++++++++ 2 files changed, 15 insertions(+) create mode 100644 cli/tests/testdata/test/doc_only.out create mode 100644 cli/tests/testdata/test/doc_only/mod.ts (limited to 'cli/tests/testdata') 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", + ); +}); -- cgit v1.2.3