Skip to content

Commit a59bdee

Browse files
committed
test: fix specs
1 parent ba2c2e7 commit a59bdee

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"test": "nx run-many --target=test --exclude=playground --all",
77
"lint": "nx run-many --target=lint --exclude=playground --all",
88
"build": "nx build react-rxjs",
9-
"cz": "cz",
9+
"c": "cz",
1010
"prepare": "husky install"
1111
},
1212
"private": true,
@@ -64,4 +64,4 @@
6464
"@commitlint/config-conventional"
6565
]
6666
}
67-
}
67+
}

packages/react-rxjs/src/use-observable/use-observable.spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ describe('useObservable', () => {
2020
});
2121

2222
it('should update every second', () => {
23-
const { result } = renderHook(() => useObservable(interval(1000), 0));
23+
const { result } = renderHook(() => useObservable(interval(1000), { initialValue: 0 }));
2424
let [next] = result.current;
2525

2626
expect(next).toBe(0);
@@ -45,7 +45,7 @@ describe('useObservable', () => {
4545
it('should return an error', () => {
4646
const { result } = renderHook(() => useObservable(of(1).pipe(map(error => {
4747
throw new Error('error');
48-
})), 0));
48+
})), { initialValue: 0 }));
4949

5050
const [next, { error, completed }] = result.current;
5151

@@ -57,7 +57,7 @@ describe('useObservable', () => {
5757
it('should unsubscribe', () => {
5858
const spy = jest.fn();
5959

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 }));
6161

6262
// eslint-disable-next-line prefer-const
6363
let [next] = result.current;

0 commit comments

Comments
 (0)