summaryrefslogtreecommitdiff
path: root/cli/tests/unit
diff options
context:
space:
mode:
Diffstat (limited to 'cli/tests/unit')
-rw-r--r--cli/tests/unit/filter_function_test.ts52
1 files changed, 0 insertions, 52 deletions
diff --git a/cli/tests/unit/filter_function_test.ts b/cli/tests/unit/filter_function_test.ts
deleted file mode 100644
index 2c1d9a7c8..000000000
--- a/cli/tests/unit/filter_function_test.ts
+++ /dev/null
@@ -1,52 +0,0 @@
-import { assertEquals, unitTest } from "./test_util.ts";
-
-// @ts-expect-error TypeScript (as of 3.7) does not support indexing namespaces by symbol
-const { createFilterFn } = Deno[Deno.internal];
-
-unitTest(function filterAsString(): void {
- const filterFn = createFilterFn("my-test");
- const tests = [
- {
- fn(): void {},
- name: "my-test",
- },
- {
- fn(): void {},
- name: "other-test",
- },
- ];
- const filteredTests = tests.filter(filterFn);
- assertEquals(filteredTests.length, 1);
-});
-
-unitTest(function filterAsREGEX(): void {
- const filterFn = createFilterFn("/.+-test/");
- const tests = [
- {
- fn(): void {},
- name: "my-test",
- },
- {
- fn(): void {},
- name: "other-test",
- },
- ];
- const filteredTests = tests.filter(filterFn);
- assertEquals(filteredTests.length, 2);
-});
-
-unitTest(function filterAsEscapedREGEX(): void {
- const filterFn = createFilterFn("/\\w+-test/");
- const tests = [
- {
- fn(): void {},
- name: "my-test",
- },
- {
- fn(): void {},
- name: "other-test",
- },
- ];
- const filteredTests = tests.filter(filterFn);
- assertEquals(filteredTests.length, 2);
-});