From 2ee5df927616f02c1291f22a19ba95f793b1ebbe Mon Sep 17 00:00:00 2001 From: Antoine du Hamel Date: Tue, 17 Sep 2024 12:25:28 +0200 Subject: [PATCH] fixup! module: report unfinished TLA in ambiguous modules --- test/es-module/test-esm-detect-ambiguous.mjs | 2 +- test/fixtures/es-modules/tla/unresolved.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 test/fixtures/es-modules/tla/unresolved.js diff --git a/test/es-module/test-esm-detect-ambiguous.mjs b/test/es-module/test-esm-detect-ambiguous.mjs index 62b4fa7ef2ba0b..5d5a2744afcd14 100644 --- a/test/es-module/test-esm-detect-ambiguous.mjs +++ b/test/es-module/test-esm-detect-ambiguous.mjs @@ -255,7 +255,7 @@ describe('Module syntax detection', { concurrency: !process.env.TEST_PARALLEL }, it('reports unfinished top-level `await`', async () => { const { stdout, stderr, code, signal } = await spawnPromisified(process.execPath, [ '--no-warnings', - fixtures.path('es-modules/tla/unresolved.js') + fixtures.path('es-modules/tla/unresolved.js'), ]); strictEqual(stderr, ''); diff --git a/test/fixtures/es-modules/tla/unresolved.js b/test/fixtures/es-modules/tla/unresolved.js new file mode 100644 index 00000000000000..231a8cd634825c --- /dev/null +++ b/test/fixtures/es-modules/tla/unresolved.js @@ -0,0 +1 @@ +await new Promise(() => {});