Skip to content

Commit

Permalink
testing: Don't automatically run on import (denoland#129)
Browse files Browse the repository at this point in the history
  • Loading branch information
ry authored Jan 24, 2019
1 parent 47e6fc7 commit ec1675a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 2 additions & 0 deletions test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 changes: 3 additions & 0 deletions testing/main.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// Copyright 2018-2019 the Deno authors. All rights reserved. MIT license.
import { runTests } from "mod.ts";
runTests();
4 changes: 1 addition & 3 deletions testing/mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -283,5 +283,3 @@ async function runTests() {
}, 0);
}
}

setTimeout(runTests, 0);

0 comments on commit ec1675a

Please sign in to comment.