Skip to content

Commit

Permalink
foo
Browse files Browse the repository at this point in the history
  • Loading branch information
cjihrig committed Mar 1, 2021
1 parent da217d0 commit 32cb5b7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/wasi/test-return-on-exit.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ const buffer = fs.readFileSync(modulePath);
// Verify that if a WASI application throws an exception, Node rethrows it
// properly.
const wasi = new WASI({ returnOnExit: true });
wasi.wasiImport.proc_exit = () => { throw new Error('test error'); };
const patchedExit = () => { throw new Error('test error'); };
wasi.wasiImport.proc_exit = patchedExit.bind(wasi.wasiImport);
const importObject = { wasi_snapshot_preview1: wasi.wasiImport };
const { instance } = await WebAssembly.instantiate(buffer, importObject);

Expand Down

0 comments on commit 32cb5b7

Please sign in to comment.