File tree 1 file changed +5
-3
lines changed
test/cases/wasm/js-incompatible-type
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
+
1
3
it ( "should disallow exporting a func signature with result i64" , function ( ) {
2
4
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 ) ;
4
6
} ) ;
5
7
} ) ;
6
8
7
9
it ( "should disallow exporting a func signature with param i64" , function ( ) {
8
10
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 ) ;
10
12
} ) ;
11
13
} ) ;
12
14
13
15
it ( "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 ) ;
15
17
} ) ;
You can’t perform that action at this time.
0 commit comments