File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
test/cases/wasm/js-incompatible-type Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 1+ const errorRegex = / w a s m f u n c t i o n s i g n a t u r e c o n t a i n s i l l e g a l t y p e | i n v a l i d t y p e / ;
2+
13it ( "should disallow exporting a func signature with result i64" , function ( ) {
24 return import ( "./export-i64-result" ) . then ( ( { a} ) => {
3- expect ( ( ) => a ( ) ) . toThrow ( / i n v a l i d t y p e / ) ;
5+ expect ( ( ) => a ( ) ) . toThrow ( errorRegex ) ;
46 } ) ;
57} ) ;
68
79it ( "should disallow exporting a func signature with param i64" , function ( ) {
810 return import ( "./export-i64-param" ) . then ( ( { a} ) => {
9- expect ( ( ) => a ( ) ) . toThrow ( / i n v a l i d t y p e / ) ;
11+ expect ( ( ) => a ( ) ) . toThrow ( errorRegex ) ;
1012 } ) ;
1113} ) ;
1214
1315it ( "should disallow importing a value type of i64" , function ( ) {
14- return expect ( import ( "./import-i64.wat" ) ) . rejects . toThrow ( / i n v a l i d t y p e / ) ;
16+ return expect ( import ( "./import-i64.wat" ) ) . rejects . toThrow ( errorRegex ) ;
1517} ) ;
You can’t perform that action at this time.
0 commit comments