blob: 054db030aab742994a51dcbd39ab11a6edbb90c5 [file] [log] [blame]
import * as sum from "./sum.wasm"
import * as assert from '../assert.js';
assert.isObject(sum);
assert.isFunction(sum.sum);
assert.eq(sum.sum(32, 42), 74);
assert.eq(sum.sum(-2, 42), 40);
assert.throws(() => {
sum.sum = 32;
}, TypeError, `Attempted to assign to readonly property.`);