@@ -57,25 +57,28 @@ const sszStatic =
57
57
( ssz . altair as Types ) [ typeName ] ||
58
58
( ssz . phase0 as Types ) [ typeName ] ;
59
59
60
+ it ( `${ fork } - ${ typeName } type exists` , function ( ) {
61
+ expect ( sszType ) . toEqualWithMessage ( expect . any ( Type ) , `SSZ type ${ typeName } for fork ${ fork } is not defined` ) ;
62
+ } ) ;
63
+
60
64
if ( ! sszType ) {
61
- expect . fail (
62
- `Missing SSZ type definition for ${ typeName } ; this will prevent associated ssz_static tests to be executed`
63
- ) ;
64
- } else {
65
- const sszTypeNoUint = replaceUintTypeWithUintBigintType ( sszType ) ;
65
+ // Return instead of throwing an error to only skip ssz_static tests associated to missing type
66
+ return ;
67
+ }
68
+
69
+ const sszTypeNoUint = replaceUintTypeWithUintBigintType ( sszType ) ;
66
70
67
- for ( const testCase of fs . readdirSync ( testSuiteDirpath ) ) {
68
- // Do not manually skip tests here, do it in packages/beacon-node/test/spec/presets/index.test.ts
69
- it ( testCase , function ( ) {
70
- // Mainnet must deal with big full states and hash each one multiple times
71
- if ( ACTIVE_PRESET === "mainnet" ) {
72
- vi . setConfig ( { testTimeout : 30 * 1000 } ) ;
73
- }
71
+ for ( const testCase of fs . readdirSync ( testSuiteDirpath ) ) {
72
+ // Do not manually skip tests here, do it in packages/beacon-node/test/spec/presets/index.test.ts
73
+ it ( testCase , function ( ) {
74
+ // Mainnet must deal with big full states and hash each one multiple times
75
+ if ( ACTIVE_PRESET === "mainnet" ) {
76
+ vi . setConfig ( { testTimeout : 30 * 1000 } ) ;
77
+ }
74
78
75
- const testData = parseSszStaticTestcase ( path . join ( testSuiteDirpath , testCase ) ) ;
76
- runValidSszTest ( sszTypeNoUint , testData ) ;
77
- } ) ;
78
- }
79
+ const testData = parseSszStaticTestcase ( path . join ( testSuiteDirpath , testCase ) ) ;
80
+ runValidSszTest ( sszTypeNoUint , testData ) ;
81
+ } ) ;
79
82
}
80
83
} ;
81
84
0 commit comments