From 327a8f7b5944694d47f6f3d8db18d50999865673 Mon Sep 17 00:00:00 2001 From: Aviv Keller Date: Fri, 20 Sep 2024 06:42:59 -0400 Subject: [PATCH] test: fix invalid wasm test PR-URL: https://github.com/nodejs/node/pull/54935 Reviewed-By: Benjamin Gruenbaum Reviewed-By: Luigi Pinca --- .../test-esm-extensionless-esm-and-wasm.mjs | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/test/es-module/test-esm-extensionless-esm-and-wasm.mjs b/test/es-module/test-esm-extensionless-esm-and-wasm.mjs index a8931dfbabd154..17786b61291ab6 100644 --- a/test/es-module/test-esm-extensionless-esm-and-wasm.mjs +++ b/test/es-module/test-esm-extensionless-esm-and-wasm.mjs @@ -1,8 +1,8 @@ // Flags: --experimental-wasm-modules -import { mustNotCall, spawnPromisified } from '../common/index.mjs'; +import { spawnPromisified } from '../common/index.mjs'; import * as fixtures from '../common/fixtures.mjs'; import { describe, it } from 'node:test'; -import { match, ok, strictEqual } from 'node:assert'; +import { match, strictEqual } from 'node:assert'; describe('extensionless ES modules within a "type": "module" package scope', { concurrency: !process.env.TEST_PARALLEL, @@ -91,13 +91,7 @@ describe('extensionless Wasm within no package scope', { concurrency: !process.e strictEqual(signal, null); }); - // This succeeds with `--experimental-default-type=module` - it('should error on import', async () => { - try { - await import(fixtures.fileURL('es-modules/noext-wasm')); - mustNotCall(); - } catch (err) { - ok(err instanceof SyntaxError); - } + it('should run on import', async () => { + await import(fixtures.fileURL('es-modules/noext-wasm')); }); });