@@ -20,7 +20,7 @@ describe('useObservable', () => {
20
20
} ) ;
21
21
22
22
it ( 'should update every second' , ( ) => {
23
- const { result } = renderHook ( ( ) => useObservable ( interval ( 1000 ) , 0 ) ) ;
23
+ const { result } = renderHook ( ( ) => useObservable ( interval ( 1000 ) , { initialValue : 0 } ) ) ;
24
24
let [ next ] = result . current ;
25
25
26
26
expect ( next ) . toBe ( 0 ) ;
@@ -45,7 +45,7 @@ describe('useObservable', () => {
45
45
it ( 'should return an error' , ( ) => {
46
46
const { result } = renderHook ( ( ) => useObservable ( of ( 1 ) . pipe ( map ( error => {
47
47
throw new Error ( 'error' ) ;
48
- } ) ) , 0 ) ) ;
48
+ } ) ) , { initialValue : 0 } ) ) ;
49
49
50
50
const [ next , { error, completed } ] = result . current ;
51
51
@@ -57,7 +57,7 @@ describe('useObservable', () => {
57
57
it ( 'should unsubscribe' , ( ) => {
58
58
const spy = jest . fn ( ) ;
59
59
60
- const { result, unmount } = renderHook ( ( ) => useObservable ( interval ( 1000 ) . pipe ( finalize ( spy ) ) , 0 ) ) ;
60
+ const { result, unmount } = renderHook ( ( ) => useObservable ( interval ( 1000 ) . pipe ( finalize ( spy ) ) , { initialValue : 0 } ) ) ;
61
61
62
62
// eslint-disable-next-line prefer-const
63
63
let [ next ] = result . current ;
0 commit comments