Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function runTest(file, type, binary, wat) {
const context = new TestContext({
fileName: file,
reporter,
stderr: process.stderr,
stdout: process.stdout,
});
const imports = context.createImports({
wasi_unstable: wasi.exports,
});
const wasm = instantiateBuffer(binary, imports);
wasi.setMemory(wasm.memory);
wasi.view = new DataView(wasm.memory.buffer);
context.run(wasm);
}