1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-01-14 10:01:51 -05:00

Add runIfMain method (#215)

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

View file

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