Merge pull request #7356 from backstage/dependabot/npm_and_yarn/testing-library/react-hooks-7.0.2

build(deps): bump @testing-library/react-hooks from 3.4.2 to 7.0.2
This commit is contained in:
Fredrik Adelöw
2021-09-28 15:25:56 +02:00
committed by GitHub
18 changed files with 47 additions and 23 deletions
+1 -1
View File
@@ -67,7 +67,7 @@
"@backstage/test-utils": "^0.1.17",
"@testing-library/jest-dom": "^5.10.1",
"@testing-library/react": "^11.2.5",
"@testing-library/react-hooks": "^3.4.2",
"@testing-library/react-hooks": "^7.0.2",
"@testing-library/user-event": "^13.1.8",
"@types/dompurify": "^2.2.2",
"@types/jest": "^26.0.7",
@@ -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',