File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import { join } from "node:path" ;
22
3- import { suite , test , assert } from "vitest" ;
3+ import { suite , test , assert , expect } from "vitest" ;
44
55import { WASIShim } from "@bytecodealliance/preview2-shim/instantiation" ;
66
@@ -31,10 +31,7 @@ suite("Async (WASI P3)", () => {
3131 const result = await instance . asyncAddS32 . add ( 2 , 2 ) ;
3232 assert . strictEqual ( result , 4 ) ;
3333
34- // TODO(fix): this line should throw the value, not return a result object,
35- // this behavior does not match the default for non-erroring call
36- const res = await instance . asyncAddS32 . add ( 1 , 2147483647 ) ;
37- assert . deepStrictEqual ( res , { tag : "error" , val : "overflow" } ) ;
34+ await expect ( ( ) => instance . asyncAddS32 . add ( 1 , 2147483647 ) ) . rejects . toThrowError ( / o v e r f l o w / ) ;
3835
3936 await cleanup ( ) ;
4037 } ) ;
Original file line number Diff line number Diff line change @@ -18,13 +18,13 @@ suite("stream<T> lifts", () => {
1818 path : join ( LOCAL_TEST_COMPONENTS_DIR , `${ name } .wasm` ) ,
1919 skipInstantiation : true ,
2020 } ,
21- jco : {
22- transpile : {
23- extraArgs : {
24- minify : false ,
25- } ,
26- } ,
27- } ,
21+ // jco: {
22+ // transpile: {
23+ // extraArgs: {
24+ // minify: false,
25+ // },
26+ // },
27+ // },
2828 } ) ;
2929
3030 esModule = setupRes . esModule ;
You can’t perform that action at this time.
0 commit comments