diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2020-04-27 14:51:22 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-27 14:51:22 +0200 |
commit | 8e4333fd99bdc71020c4e2d135da8315f94d9763 (patch) | |
tree | 79b3f9eee4068058a13240c523cecbd0cc471739 /cli/js/testing.ts | |
parent | df0000ff0a3ce20292fe73b909cd31bd352d5266 (diff) |
BREAKING: remove Deno.runTests() API (#4922)
Deno.runTests() interface is not yet good enough to be exposed
publicly with stability guarantees.
This commit removes public API related to testing: Deno.runTests()
and Deno.TestMessage, but keeps them exposed on Deno.internal object
so they can be used with "deno test" subcommand.
Diffstat (limited to 'cli/js/testing.ts')
-rw-r--r-- | cli/js/testing.ts | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/cli/js/testing.ts b/cli/js/testing.ts index fdb6c69fd..93b603419 100644 --- a/cli/js/testing.ts +++ b/cli/js/testing.ts @@ -142,7 +142,7 @@ export function test( TEST_REGISTRY.push(testDef); } -export interface TestMessage { +interface TestMessage { start?: { tests: TestDefinition[]; }; @@ -317,7 +317,7 @@ function createFilterFn( }; } -export interface RunTestsOptions { +interface RunTestsOptions { exitOnFail?: boolean; failFast?: boolean; filter?: string | RegExp; @@ -327,7 +327,7 @@ export interface RunTestsOptions { onMessage?: (message: TestMessage) => void | Promise<void>; } -export async function runTests({ +async function runTests({ exitOnFail = true, failFast = false, filter = undefined, @@ -372,3 +372,5 @@ export async function runTests({ return endMsg!; } + +exposeForTest("runTests", runTests); |