slow down there fella

Signed-off-by: Fredrik Adelöw <freben@gmail.com>
This commit is contained in:
Fredrik Adelöw
2021-09-28 14:09:12 +02:00
parent dcf32f9189
commit f5e6961bc8
@@ -359,7 +359,9 @@ describe('useReaderState', () => {
contentReload: expect.any(Function),
});
await waitForValueToChange(() => result.current.state);
await waitForValueToChange(() => result.current.state, {
timeout: 2000,
});
expect(result.current).toEqual({
state: 'INITIAL_BUILD',
@@ -496,7 +498,9 @@ describe('useReaderState', () => {
});
// the new content is loaded
await waitForValueToChange(() => result.current.state);
await waitForValueToChange(() => result.current.state, {
timeout: 2000,
});
expect(result.current).toEqual({
state: 'CONTENT_FRESH',
path: '/example',
@@ -576,7 +580,9 @@ describe('useReaderState', () => {
contentReload: expect.any(Function),
});
await waitForValueToChange(() => result.current.state);
await waitForValueToChange(() => result.current.state, {
timeout: 2000,
});
expect(result.current).toEqual({
state: 'CONTENT_FRESH',
path: '/new',