summaryrefslogtreecommitdiff
path: root/testing
diff options
context:
space:
mode:
Diffstat (limited to 'testing')
-rw-r--r--testing/mod.ts6
1 files changed, 6 insertions, 0 deletions
diff --git a/testing/mod.ts b/testing/mod.ts
index e8e00ca74..45a38919a 100644
--- a/testing/mod.ts
+++ b/testing/mod.ts
@@ -290,3 +290,9 @@ export async function runTests() {
}, 0);
}
}
+
+export async function runIfMain(meta: ImportMeta) {
+ if (window.location.toString() === meta.url) {
+ runTests();
+ }
+}