diff options
author | David Sherret <dsherret@users.noreply.github.com> | 2022-10-25 13:18:54 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-25 13:18:54 -0400 |
commit | 3f22f912ec4996fecb05ba6d5baa1a02bdffe78e (patch) | |
tree | 40ae2262a1f01b79d22365a9b3b14ed15e48c0a1 | |
parent | 9835b095e56bdfc2b195b2c4741631b78a759115 (diff) |
chore: fix flaky esm_module_deno_test test (#16419)
-rw-r--r-- | cli/tests/testdata/npm/esm/main.js | 4 | ||||
-rw-r--r-- | cli/tests/testdata/npm/esm/test.out | 1 |
2 files changed, 3 insertions, 2 deletions
diff --git a/cli/tests/testdata/npm/esm/main.js b/cli/tests/testdata/npm/esm/main.js index 3dfa8122a..0f1fa2590 100644 --- a/cli/tests/testdata/npm/esm/main.js +++ b/cli/tests/testdata/npm/esm/main.js @@ -1,6 +1,8 @@ import chalk from "npm:chalk@5"; -console.log(chalk.green("chalk esm loads")); +if (import.meta.main) { + console.log(chalk.green("chalk esm loads")); +} export function test(value) { return chalk.red(value); diff --git a/cli/tests/testdata/npm/esm/test.out b/cli/tests/testdata/npm/esm/test.out index 2c1179bd1..b3115e79f 100644 --- a/cli/tests/testdata/npm/esm/test.out +++ b/cli/tests/testdata/npm/esm/test.out @@ -1,7 +1,6 @@ Download http://localhost:4545/npm/registry/chalk Download http://localhost:4545/npm/registry/chalk/chalk-5.0.1.tgz Check [WILDCARD]/std/node/module_all.ts -chalk esm loads running 1 test from ./npm/esm/test.js test ... ------- output ------- |