From 8e720b163323446d13b489fe32983e995b5ac048 Mon Sep 17 00:00:00 2001 From: Mert Can Altin Date: Sat, 30 Nov 2024 23:36:08 +0300 Subject: [PATCH] Update test/es-module/test-esm-detect-ambiguous.mjs Co-authored-by: Geoffrey Booth --- test/es-module/test-esm-detect-ambiguous.mjs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/test/es-module/test-esm-detect-ambiguous.mjs b/test/es-module/test-esm-detect-ambiguous.mjs index 553cfb91c91e61..e53687d9a65c1b 100644 --- a/test/es-module/test-esm-detect-ambiguous.mjs +++ b/test/es-module/test-esm-detect-ambiguous.mjs @@ -291,10 +291,7 @@ describe('Module syntax detection', { concurrency: !process.env.TEST_PARALLEL }, it('throws on undefined `require` when top-level `await` triggers ESM parsing', async () => { const { stdout, stderr, code, signal } = await spawnPromisified(process.execPath, [ '--eval', - ` - const fs = require("node:fs"); - await Promise.resolve(); - `, + 'const fs = require("node:fs"); await Promise.resolve();', ]); match(stderr, /ReferenceError: require is not defined in ES module scope/);