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/);