diff options
| author | Ryan Dahl <ry@tinyclouds.org> | 2019-01-24 16:25:13 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-01-24 16:25:13 -0500 |
| commit | 6a0e32dc35dd27807f4b95556ddb8c1fe26fae89 (patch) | |
| tree | 5fb1d43648f1d43f26801de61094c9d3fa31a03d | |
| parent | 57b6fdb2eb743260a771489b98eb9e691ccad236 (diff) | |
testing: Don't automatically run on import (denoland/deno_std#129)
Original: https://github.com/denoland/deno_std/commit/ec1675a8cad2b9044ac8cf205920c0f230127133
| -rwxr-xr-x | test.ts | 2 | ||||
| -rw-r--r-- | testing/main.ts | 3 | ||||
| -rw-r--r-- | testing/mod.ts | 4 |
3 files changed, 6 insertions, 3 deletions
@@ -23,3 +23,5 @@ import "testing/test.ts"; import "textproto/test.ts"; import "ws/sha1_test.ts"; import "ws/test.ts"; + +import "testing/main.ts"; diff --git a/testing/main.ts b/testing/main.ts new file mode 100644 index 000000000..d7e703697 --- /dev/null +++ b/testing/main.ts @@ -0,0 +1,3 @@ +// Copyright 2018-2019 the Deno authors. All rights reserved. MIT license. +import { runTests } from "mod.ts"; +runTests(); diff --git a/testing/mod.ts b/testing/mod.ts index 42f3939c5..762d37c48 100644 --- a/testing/mod.ts +++ b/testing/mod.ts @@ -238,7 +238,7 @@ function green_ok() { return FG_GREEN + "ok" + RESET; } -async function runTests() { +export async function runTests() { let passed = 0; let failed = 0; @@ -283,5 +283,3 @@ async function runTests() { }, 0); } } - -setTimeout(runTests, 0); |
