Skip to content

Commit

Permalink
test: fix invalid wasm test
Browse files Browse the repository at this point in the history
PR-URL: #54935
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
  • Loading branch information
Aviv Keller authored and targos committed Oct 4, 2024
1 parent 5b012f5 commit 327a8f7
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions test/es-module/test-esm-extensionless-esm-and-wasm.mjs
Original file line number Diff line number Diff line change
@@ -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,
Expand Down Expand Up @@ -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'));
});
});

0 comments on commit 327a8f7

Please sign in to comment.