mirror of
https://github.com/streamich/react-use.git
synced 2026-01-25 14:17:16 +00:00
test: update test for userStateWithHistory
This commit is contained in:
parent
fca687d32c
commit
015d491ce7
@ -52,9 +52,9 @@ describe('useStateWithHistory', () => {
|
||||
});
|
||||
expect(hook.result.current[0][0]).toBe(321);
|
||||
act(() => {
|
||||
hook.result.current[0][1](() => 111);
|
||||
hook.result.current[0][1]((current) => (current ?? 0) + 111);
|
||||
});
|
||||
expect(hook.result.current[0][0]).toBe(111);
|
||||
expect(hook.result.current[0][0]).toBe(432);
|
||||
});
|
||||
|
||||
it('should receive initial history', () => {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user