diff options
author | Casper Beyer <caspervonb@pm.me> | 2021-04-29 02:17:04 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-28 20:17:04 +0200 |
commit | c455c28b834683f6516422dbf1b020fbb2c1bbb6 (patch) | |
tree | 96e1484f4853969ae46539c26ffd8d716f409eb7 /cli/tests/unit | |
parent | 0260b488fbba9a43c64641428d3603b8761067a4 (diff) |
feat(test): run test modules in parallel (#9815)
This commit adds support for running test in parallel.
Entire test runner functionality has been rewritten
from JavaScript to Rust and a set of ops was added to support reporting in Rust.
A new "--jobs" flag was added to "deno test" that allows to configure
how many threads will be used. When given no value it defaults to 2.
Diffstat (limited to 'cli/tests/unit')
-rw-r--r-- | cli/tests/unit/filter_function_test.ts | 52 |
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); -}); |