@@ -8,7 +8,7 @@ beforeEach(() => {
88
99it ( 'Should use interval' , ( ) => {
1010 const { result } = renderHook ( ( ) => useInterval ( vi . fn , 1000 ) ) ;
11- expect ( result . current . active ) . toBe ( true ) ;
11+ expect ( result . current . active ) . toBeTruthy ( ) ;
1212 expect ( typeof result . current . pause ) . toBe ( 'function' ) ;
1313 expect ( typeof result . current . resume ) . toBe ( 'function' ) ;
1414} ) ;
@@ -17,24 +17,24 @@ it('Should pause and resume properly', () => {
1717 const { result } = renderHook ( ( ) => useInterval ( ( ) => { } , 1000 ) ) ;
1818 const { pause, resume } = result . current ;
1919
20- expect ( result . current . active ) . toBe ( true ) ;
20+ expect ( result . current . active ) . toBeTruthy ( ) ;
2121 act ( pause ) ;
22- expect ( result . current . active ) . toBe ( false ) ;
22+ expect ( result . current . active ) . toBeFalsy ( ) ;
2323 act ( resume ) ;
24- expect ( result . current . active ) . toBe ( true ) ;
24+ expect ( result . current . active ) . toBeTruthy ( ) ;
2525} ) ;
2626
2727it ( 'Should not be active when disabled' , ( ) => {
2828 const { result } = renderHook ( ( ) => useInterval ( ( ) => { } , 1000 , { enabled : false } ) ) ;
2929
30- expect ( result . current . active ) . toBe ( false ) ;
30+ expect ( result . current . active ) . toBeFalsy ( ) ;
3131} ) ;
3232
3333it ( 'Should call callback on interval' , ( ) => {
3434 const callback = vi . fn ( ) ;
3535 const { result } = renderHook ( ( ) => useInterval ( callback , 1000 ) ) ;
3636
37- expect ( result . current . active ) . toBe ( true ) ;
37+ expect ( result . current . active ) . toBeTruthy ( ) ;
3838 act ( ( ) => vi . advanceTimersByTime ( 1000 ) ) ;
3939
4040 expect ( callback ) . toBeCalledTimes ( 1 ) ;
0 commit comments