From 7470b2d2a765396a283bfd169b5fa9bacf0c01d0 Mon Sep 17 00:00:00 2001 From: David Sherret Date: Wed, 13 Jul 2022 11:01:52 -0400 Subject: [PATCH] chore: fix flaky `integration::test::meta` (#15192) --- cli/tests/testdata/test/meta.out | 8 ++++++-- cli/tests/testdata/test/meta.ts | 9 +++++++-- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/cli/tests/testdata/test/meta.out b/cli/tests/testdata/test/meta.out index c7cc959468..c46315ece7 100644 --- a/cli/tests/testdata/test/meta.out +++ b/cli/tests/testdata/test/meta.out @@ -1,7 +1,11 @@ Check [WILDCARD]/test/meta.ts +running 1 test from ./test/meta.ts +check values ... +------- output ------- import.meta.main: false import.meta.url: [WILDCARD]/test/meta.ts -running 0 tests from ./test/meta.ts +----- output end ----- +check values ... ok ([WILDCARD]) -ok | 0 passed | 0 failed ([WILDCARD]) +ok | 1 passed | 0 failed ([WILDCARD]) diff --git a/cli/tests/testdata/test/meta.ts b/cli/tests/testdata/test/meta.ts index e32fdeea6c..f2433a96dd 100644 --- a/cli/tests/testdata/test/meta.ts +++ b/cli/tests/testdata/test/meta.ts @@ -1,2 +1,7 @@ -console.log("import.meta.main: %s", import.meta.main); -console.log("import.meta.url: %s", import.meta.url); +const main = import.meta.main; +const url = import.meta.url; + +Deno.test("check values", () => { + console.log("import.meta.main: %s", main); + console.log("import.meta.url: %s", url); +});