diff options
-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 ------- |