1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-26 16:09:27 -05:00

Add runIfMain method (denoland/deno_std#215)

Original: 817a0fb439
This commit is contained in:
Bartek Iwańczuk 2019-02-23 17:18:43 +01:00 committed by Ryan Dahl
parent a4383984d1
commit ad77215052

View file

@ -290,3 +290,9 @@ export async function runTests() {
}, 0);
}
}
export async function runIfMain(meta: ImportMeta) {
if (window.location.toString() === meta.url) {
runTests();
}
}