From c455c28b834683f6516422dbf1b020fbb2c1bbb6 Mon Sep 17 00:00:00 2001 From: Casper Beyer Date: Thu, 29 Apr 2021 02:17:04 +0800 Subject: 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. --- cli/tests/unit/filter_function_test.ts | 52 ---------------------------------- 1 file changed, 52 deletions(-) delete mode 100644 cli/tests/unit/filter_function_test.ts (limited to 'cli/tests/unit') 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); -}); -- cgit v1.2.3