Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
5 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,17 @@ | ||
const errorRegex = /wasm function signature contains illegal type|invalid type/; | ||
|
||
it("should disallow exporting a func signature with result i64", function() { | ||
return import("./export-i64-result").then(({a}) => { | ||
expect(() => a()).toThrow(/invalid type/); | ||
expect(() => a()).toThrow(errorRegex); | ||
}); | ||
}); | ||
|
||
it("should disallow exporting a func signature with param i64", function() { | ||
return import("./export-i64-param").then(({a}) => { | ||
expect(() => a()).toThrow(/invalid type/); | ||
expect(() => a()).toThrow(errorRegex); | ||
}); | ||
}); | ||
|
||
it("should disallow importing a value type of i64", function() { | ||
return expect(import("./import-i64.wat")).rejects.toThrow(/invalid type/); | ||
return expect(import("./import-i64.wat")).rejects.toThrow(errorRegex); | ||
}); |