MCPcopy Create free account
hub / github.com/nodejs/node / assertCompileError

Function assertCompileError

deps/v8/test/mjsunit/wasm/errors.js:13–20  ·  view source on GitHub ↗
(bytes, msg)

Source from the content-addressed store, hash-verified

11}
12
13function assertCompileError(bytes, msg) {
14 assertThrows(
15 () => new WebAssembly.Module(bytes), WebAssembly.CompileError,
16 'WebAssembly.Module(): ' + msg);
17 assertThrowsAsync(
18 WebAssembly.compile(bytes), WebAssembly.CompileError,
19 'WebAssembly.compile(): ' + msg);
20}
21
22function assertInstantiateError(error, bytes, imports = {}, msg) {
23 assertThrows(

Callers 1

errors.jsFile · 0.70

Calls 3

assertThrowsFunction · 0.50
assertThrowsAsyncFunction · 0.50
compileMethod · 0.45

Tested by

no test coverage detected