fix wasm table test case

This commit is contained in:
Tobias Koppers 2018-05-05 14:57:50 +02:00
parent 7c7af01a85
commit 839e80aa49
3 changed files with 7 additions and 7 deletions

View File

@ -19,10 +19,10 @@ it("should support exported tables", function() {
});
});
// it("should support imported tables", function() {
// return import("./wasm-table-imported.wasm").then(function(wasm) {
// expect(wasm.callByIndex(0)).toEqual(42);
// expect(wasm.callByIndex(1)).toEqual(13);
// expect(() => wasm.callByIndex(2)).toThrow("invalid function");
// });
// });
it("should support imported tables", function() {
return import("./wasm-table-imported.wasm").then(function(wasm) {
expect(wasm.callByIndex(0)).toEqual(42);
expect(wasm.callByIndex(1)).toEqual(13);
expect(() => wasm.callByIndex(2)).toThrow("invalid function");
});
});