File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed
Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -227,9 +227,8 @@ export const toBeEpochSlotNumber = (received: number) => {
227227
228228 const max = globalThis . latest . block . epoch_slot ! + buffer ;
229229
230- expect ( received ) . toBeInRange ( min , max ) ;
231230 return {
232- pass : true ,
231+ pass : typeof received === 'number' && toBeInRange . toBe ( received , min , max ) . pass ,
233232 message : ( ) => `Expected value ${ received } to be within range for an epoch <${ min } , ${ max } >` ,
234233 } ;
235234} ;
@@ -246,9 +245,8 @@ export const toBeSlotNumber = (received: number) => {
246245
247246 const max = globalThis . latest . block . slot ! ; // Note: this could be improved to match interval for given network
248247
249- expect ( received ) . toBeInRange ( min , max + 150 ) ;
250248 return {
251- pass : true ,
249+ pass : typeof received === 'number' && toBeInRange . toBe ( received , min , max + 150 ) . pass ,
252250 message : ( ) => `Expected value ${ received } to be within range for a slot <${ min } , ${ max } >` ,
253251 } ;
254252} ;
You can’t perform that action at this time.
0 commit comments