0
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-10-30 09:08:00 -04:00

testing: Don't automatically run on import (denoland/deno_std#129)

Original: ec1675a8ca
This commit is contained in:
Ryan Dahl 2019-01-24 16:25:13 -05:00 committed by GitHub
parent 57b6fdb2eb
commit 6a0e32dc35
3 changed files with 6 additions and 3 deletions

View file

@ -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";

3
testing/main.ts Normal file
View file

@ -0,0 +1,3 @@
// Copyright 2018-2019 the Deno authors. All rights reserved. MIT license.
import { runTests } from "mod.ts";
runTests();

View file

@ -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);