Skip to content

test: fix invalid test

Rodrigo Muino Tomonari requested to merge github/fork/RedYetiDev/patch-504488 into main

The test setup is incorrect:

it('should error on import', async () => {
  try {
    await import(fixtures.fileURL('es-modules/noext-wasm'));
    mustNotCall();
  } catch (err) {
    ok(err instanceof SyntaxError);
  }
});

In the correct setup, mustNotCall() should be invoked as mustNotCall()();. However, the test fails in this case, indicating that the import is actually successful. This PR fixes the invalid test.

Merge request reports

Loading