MCPcopy
hub / github.com/tinygo-org/tinygo / testCall

Function testCall

testdata/wasmexit.js:4–9  ·  view source on GitHub ↗
(name, params, expected)

Source from the content-addressed store, hash-verified

2
3function runTests() {
4 let testCall = (name, params, expected) => {
5 let result = go._inst.exports[name].apply(null, params);
6 if (result !== expected) {
7 console.error(`${name}(...${params}): expected result ${expected}, got ${result}`);
8 }
9 }
10
11 // These are the same tests as in TestWasmExport.
12 testCall('hello', [], undefined);

Callers 1

runTestsFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected