diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2020-02-11 12:01:56 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-11 12:01:56 +0100 |
commit | a3bfbcceade3d359f677106399562b461b4af01a (patch) | |
tree | 93f6fcc56d98bbc0f71f5b5782381f672895f634 /cli/js/test_util.ts | |
parent | 701ce9b3342647cf01cb23c4fc28bc99ce0aa8c1 (diff) |
refactor: rewrite deno test, add Deno.test() (#3865)
* rewrite test runner in Rust
* migrate "test" and "runTests" functions from std to "Deno" namespace
* use "Deno.test()" to run internal JS unit tests
* remove std downloads for Deno subcommands
Diffstat (limited to 'cli/js/test_util.ts')
-rw-r--r-- | cli/js/test_util.ts | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/cli/js/test_util.ts b/cli/js/test_util.ts index a546fa5c5..dbb7bf2c4 100644 --- a/cli/js/test_util.ts +++ b/cli/js/test_util.ts @@ -7,7 +7,6 @@ // tests by the special string. permW1N0 means allow-write but not allow-net. // See tools/unit_tests.py for more details. -import * as testing from "../../std/testing/mod.ts"; import { assert, assertEquals } from "../../std/testing/asserts.ts"; export { assert, @@ -103,10 +102,7 @@ function normalizeTestPermissions(perms: TestPermissions): Permissions { }; } -export function testPerm( - perms: TestPermissions, - fn: testing.TestFunction -): void { +export function testPerm(perms: TestPermissions, fn: Deno.TestFunction): void { const normalizedPerms = normalizeTestPermissions(perms); registerPermCombination(normalizedPerms); @@ -115,10 +111,10 @@ export function testPerm( return; } - testing.test(fn); + Deno.test(fn); } -export function test(fn: testing.TestFunction): void { +export function test(fn: Deno.TestFunction): void { testPerm( { read: false, |