From 0c32dec9e2b0a1bb798c580a27387dc8733d3679 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 6 Jun 2022 14:45:02 +0100 Subject: [PATCH] Update dependency @types/jest to v28 (#49249) * Update dependency @types/jest to v28 * modern is now default! Co-authored-by: Renovate Bot Co-authored-by: Ashley Harrison --- package.json | 2 +- packages/grafana-data/package.json | 2 +- packages/grafana-runtime/package.json | 2 +- packages/grafana-ui/package.json | 2 +- .../src/components/Cascader/Cascader.test.tsx | 2 +- .../src/components/Logs/LogRows.test.tsx | 2 +- packages/jaeger-ui-components/package.json | 2 +- .../history/RichHistoryLocalStorage.test.ts | 2 +- public/app/core/specs/backend_srv.test.ts | 8 ++++---- public/app/core/utils/richHistory.test.ts | 2 +- public/app/features/explore/Logs.test.tsx | 2 +- .../search/components/DashboardSearch.test.tsx | 2 +- yarn.lock | 18 +++++++++--------- 13 files changed, 24 insertions(+), 24 deletions(-) diff --git a/package.json b/package.json index 4dafefc50ac..e31a082991e 100644 --- a/package.json +++ b/package.json @@ -130,7 +130,7 @@ "@types/grafana__slate-react": "npm:@types/slate-react@0.22.5", "@types/history": "4.7.11", "@types/hoist-non-react-statics": "3.3.1", - "@types/jest": "27.5.1", + "@types/jest": "28.1.1", "@types/jquery": "3.5.14", "@types/js-yaml": "^4.0.5", "@types/jsurl": "^1.2.28", diff --git a/packages/grafana-data/package.json b/packages/grafana-data/package.json index 9f115b57056..bff8d3987f1 100644 --- a/packages/grafana-data/package.json +++ b/packages/grafana-data/package.json @@ -53,7 +53,7 @@ "@testing-library/react-hooks": "8.0.0", "@testing-library/user-event": "14.2.0", "@types/history": "4.7.11", - "@types/jest": "27.5.1", + "@types/jest": "28.1.1", "@types/jquery": "3.5.14", "@types/lodash": "4.14.182", "@types/marked": "4.0.3", diff --git a/packages/grafana-runtime/package.json b/packages/grafana-runtime/package.json index ecc090ead9e..2440326e0f5 100644 --- a/packages/grafana-runtime/package.json +++ b/packages/grafana-runtime/package.json @@ -43,7 +43,7 @@ "@testing-library/user-event": "14.2.0", "@types/angular": "1.8.4", "@types/history": "4.7.11", - "@types/jest": "27.5.1", + "@types/jest": "28.1.1", "@types/lodash": "4.14.182", "@types/react": "17.0.42", "@types/react-dom": "17.0.14", diff --git a/packages/grafana-ui/package.json b/packages/grafana-ui/package.json index 662523da38a..ece36f3f76a 100644 --- a/packages/grafana-ui/package.json +++ b/packages/grafana-ui/package.json @@ -127,7 +127,7 @@ "@types/grafana__slate-react": "npm:@types/slate-react@0.22.5", "@types/hoist-non-react-statics": "3.3.1", "@types/is-hotkey": "0.1.7", - "@types/jest": "27.5.1", + "@types/jest": "28.1.1", "@types/jquery": "3.5.14", "@types/lodash": "4.14.182", "@types/mock-raf": "1.0.3", diff --git a/packages/grafana-ui/src/components/Cascader/Cascader.test.tsx b/packages/grafana-ui/src/components/Cascader/Cascader.test.tsx index e2dafc03041..c25c1c2397e 100644 --- a/packages/grafana-ui/src/components/Cascader/Cascader.test.tsx +++ b/packages/grafana-ui/src/components/Cascader/Cascader.test.tsx @@ -50,7 +50,7 @@ describe('Cascader', () => { let user: UserEvent; beforeEach(() => { - jest.useFakeTimers('modern'); + jest.useFakeTimers(); // Need to use delay: null here to work with fakeTimers // see https://github.com/testing-library/user-event/issues/833 user = userEvent.setup({ delay: null }); diff --git a/packages/grafana-ui/src/components/Logs/LogRows.test.tsx b/packages/grafana-ui/src/components/Logs/LogRows.test.tsx index ac89ee10ea4..6a116ec744a 100644 --- a/packages/grafana-ui/src/components/Logs/LogRows.test.tsx +++ b/packages/grafana-ui/src/components/Logs/LogRows.test.tsx @@ -30,7 +30,7 @@ describe('LogRows', () => { it('renders rows only limited number of rows first', () => { const rows: LogRowModel[] = [makeLog({ uid: '1' }), makeLog({ uid: '2' }), makeLog({ uid: '3' })]; - jest.useFakeTimers('modern'); + jest.useFakeTimers(); const { rerender } = render( { now = new Date(1970, 0, 1); old = new Date(1969, 0, 1); - jest.useFakeTimers('modern'); + jest.useFakeTimers(); jest.setSystemTime(now); storage = new RichHistoryLocalStorage(); await storage.deleteAll(); diff --git a/public/app/core/specs/backend_srv.test.ts b/public/app/core/specs/backend_srv.test.ts index e9c5c095101..cdae54b0062 100644 --- a/public/app/core/specs/backend_srv.test.ts +++ b/public/app/core/specs/backend_srv.test.ts @@ -154,7 +154,7 @@ describe('backendSrv', () => { describe('when making an unsuccessful call and conditions for retry are favorable and loginPing does not throw', () => { it('then it should retry', async () => { - jest.useFakeTimers('modern'); + jest.useFakeTimers(); const url = '/api/dashboard/'; const { backendSrv, appEventsMock, logoutMock, expectRequestCallChain } = getTestContext({ ok: false, @@ -220,7 +220,7 @@ describe('backendSrv', () => { describe('when making an unsuccessful call and conditions for retry are favorable and retry throws', () => { it('then it throw error', async () => { - jest.useFakeTimers('modern'); + jest.useFakeTimers(); const { backendSrv, appEventsMock, logoutMock, expectRequestCallChain } = getTestContext({ ok: false, status: 401, @@ -280,7 +280,7 @@ describe('backendSrv', () => { describe('when making an unsuccessful 422 call', () => { it('then it should emit Validation failed message', async () => { - jest.useFakeTimers('modern'); + jest.useFakeTimers(); const { backendSrv, appEventsMock, logoutMock, expectRequestCallChain } = getTestContext({ ok: false, status: 422, @@ -313,7 +313,7 @@ describe('backendSrv', () => { describe('when making an unsuccessful call and we handle the error', () => { it('then it should not emit message', async () => { - jest.useFakeTimers('modern'); + jest.useFakeTimers(); const { backendSrv, appEventsMock, logoutMock, expectRequestCallChain } = getTestContext({ ok: false, status: 404, diff --git a/public/app/core/utils/richHistory.test.ts b/public/app/core/utils/richHistory.test.ts index 9fbfe9b8a72..c06f1b1f393 100644 --- a/public/app/core/utils/richHistory.test.ts +++ b/public/app/core/utils/richHistory.test.ts @@ -76,7 +76,7 @@ const key = 'grafana.explore.richHistory'; describe('richHistory', () => { beforeEach(() => { - jest.useFakeTimers('modern'); + jest.useFakeTimers(); jest.setSystemTime(new Date(1970, 0, 1)); richHistoryStorageMock.addToRichHistory = jest.fn((r) => { diff --git a/public/app/features/explore/Logs.test.tsx b/public/app/features/explore/Logs.test.tsx index fcac21c1ce5..e491945ebe5 100644 --- a/public/app/features/explore/Logs.test.tsx +++ b/public/app/features/explore/Logs.test.tsx @@ -37,7 +37,7 @@ describe('Logs', () => { }; beforeEach(() => { - jest.useFakeTimers('modern'); + jest.useFakeTimers(); }); afterEach(() => { diff --git a/public/app/features/search/components/DashboardSearch.test.tsx b/public/app/features/search/components/DashboardSearch.test.tsx index a9383546e56..7b20ba4b2dc 100644 --- a/public/app/features/search/components/DashboardSearch.test.tsx +++ b/public/app/features/search/components/DashboardSearch.test.tsx @@ -19,7 +19,7 @@ jest.mock('app/core/services/search_srv'); const { mockSearch } = SearchSrv as typeof MockSearchSrv; beforeEach(() => { - jest.useFakeTimers('modern'); + jest.useFakeTimers(); mockSearch.mockClear(); }); diff --git a/yarn.lock b/yarn.lock index 9178a00a7e1..598f42c9be5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3992,7 +3992,7 @@ __metadata: "@testing-library/user-event": 14.2.0 "@types/d3-interpolate": ^1.4.0 "@types/history": 4.7.11 - "@types/jest": 27.5.1 + "@types/jest": 28.1.1 "@types/jquery": 3.5.14 "@types/lodash": 4.14.182 "@types/marked": 4.0.3 @@ -4157,7 +4157,7 @@ __metadata: "@testing-library/user-event": 14.2.0 "@types/angular": 1.8.4 "@types/history": 4.7.11 - "@types/jest": 27.5.1 + "@types/jest": 28.1.1 "@types/lodash": 4.14.182 "@types/react": 17.0.42 "@types/react-dom": 17.0.14 @@ -4379,7 +4379,7 @@ __metadata: "@types/grafana__slate-react": "npm:@types/slate-react@0.22.5" "@types/hoist-non-react-statics": 3.3.1 "@types/is-hotkey": 0.1.7 - "@types/jest": 27.5.1 + "@types/jest": 28.1.1 "@types/jquery": 3.5.14 "@types/lodash": 4.14.182 "@types/mock-raf": 1.0.3 @@ -4583,7 +4583,7 @@ __metadata: "@types/deep-freeze": ^0.1.1 "@types/grafana__slate-react": "npm:@types/slate-react@0.22.5" "@types/hoist-non-react-statics": ^3.3.1 - "@types/jest": 27.5.1 + "@types/jest": 28.1.1 "@types/lodash": 4.14.182 "@types/prop-types": 15.7.5 "@types/react": 17.0.42 @@ -10106,13 +10106,13 @@ __metadata: languageName: node linkType: hard -"@types/jest@npm:27.5.1": - version: 27.5.1 - resolution: "@types/jest@npm:27.5.1" +"@types/jest@npm:28.1.1": + version: 28.1.1 + resolution: "@types/jest@npm:28.1.1" dependencies: jest-matcher-utils: ^27.0.0 pretty-format: ^27.0.0 - checksum: be20e39f7aaf17179109c0060d0a0489cec2034d4e2e28a631284c7ecd13c5ae52f62697a33a0e89b03b6cfe54e9d5e8c2bd387ab2bd90d6071d68c63b86d1e3 + checksum: 0a8b045a7b660372decc807c390d3f99a2b12bb1659a1cd593afe04557f4b7c235b0576a5e35b1577710d20e42759d3d8755eb8bed6edc8733f47007e75a5509 languageName: node linkType: hard @@ -20317,7 +20317,7 @@ __metadata: "@types/grafana__slate-react": "npm:@types/slate-react@0.22.5" "@types/history": 4.7.11 "@types/hoist-non-react-statics": 3.3.1 - "@types/jest": 27.5.1 + "@types/jest": 28.1.1 "@types/jquery": 3.5.14 "@types/js-yaml": ^4.0.5 "@types/jsurl": ^1.2.28