mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Update dependency @types/jest to v28 (#49249)
* Update dependency @types/jest to v28 * modern is now default! Co-authored-by: Renovate Bot <bot@renovateapp.com> Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
This commit is contained in:
parent
7b750cc0f0
commit
0c32dec9e2
@ -130,7 +130,7 @@
|
|||||||
"@types/grafana__slate-react": "npm:@types/slate-react@0.22.5",
|
"@types/grafana__slate-react": "npm:@types/slate-react@0.22.5",
|
||||||
"@types/history": "4.7.11",
|
"@types/history": "4.7.11",
|
||||||
"@types/hoist-non-react-statics": "3.3.1",
|
"@types/hoist-non-react-statics": "3.3.1",
|
||||||
"@types/jest": "27.5.1",
|
"@types/jest": "28.1.1",
|
||||||
"@types/jquery": "3.5.14",
|
"@types/jquery": "3.5.14",
|
||||||
"@types/js-yaml": "^4.0.5",
|
"@types/js-yaml": "^4.0.5",
|
||||||
"@types/jsurl": "^1.2.28",
|
"@types/jsurl": "^1.2.28",
|
||||||
|
@ -53,7 +53,7 @@
|
|||||||
"@testing-library/react-hooks": "8.0.0",
|
"@testing-library/react-hooks": "8.0.0",
|
||||||
"@testing-library/user-event": "14.2.0",
|
"@testing-library/user-event": "14.2.0",
|
||||||
"@types/history": "4.7.11",
|
"@types/history": "4.7.11",
|
||||||
"@types/jest": "27.5.1",
|
"@types/jest": "28.1.1",
|
||||||
"@types/jquery": "3.5.14",
|
"@types/jquery": "3.5.14",
|
||||||
"@types/lodash": "4.14.182",
|
"@types/lodash": "4.14.182",
|
||||||
"@types/marked": "4.0.3",
|
"@types/marked": "4.0.3",
|
||||||
|
@ -43,7 +43,7 @@
|
|||||||
"@testing-library/user-event": "14.2.0",
|
"@testing-library/user-event": "14.2.0",
|
||||||
"@types/angular": "1.8.4",
|
"@types/angular": "1.8.4",
|
||||||
"@types/history": "4.7.11",
|
"@types/history": "4.7.11",
|
||||||
"@types/jest": "27.5.1",
|
"@types/jest": "28.1.1",
|
||||||
"@types/lodash": "4.14.182",
|
"@types/lodash": "4.14.182",
|
||||||
"@types/react": "17.0.42",
|
"@types/react": "17.0.42",
|
||||||
"@types/react-dom": "17.0.14",
|
"@types/react-dom": "17.0.14",
|
||||||
|
@ -127,7 +127,7 @@
|
|||||||
"@types/grafana__slate-react": "npm:@types/slate-react@0.22.5",
|
"@types/grafana__slate-react": "npm:@types/slate-react@0.22.5",
|
||||||
"@types/hoist-non-react-statics": "3.3.1",
|
"@types/hoist-non-react-statics": "3.3.1",
|
||||||
"@types/is-hotkey": "0.1.7",
|
"@types/is-hotkey": "0.1.7",
|
||||||
"@types/jest": "27.5.1",
|
"@types/jest": "28.1.1",
|
||||||
"@types/jquery": "3.5.14",
|
"@types/jquery": "3.5.14",
|
||||||
"@types/lodash": "4.14.182",
|
"@types/lodash": "4.14.182",
|
||||||
"@types/mock-raf": "1.0.3",
|
"@types/mock-raf": "1.0.3",
|
||||||
|
@ -50,7 +50,7 @@ describe('Cascader', () => {
|
|||||||
let user: UserEvent;
|
let user: UserEvent;
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
jest.useFakeTimers('modern');
|
jest.useFakeTimers();
|
||||||
// Need to use delay: null here to work with fakeTimers
|
// Need to use delay: null here to work with fakeTimers
|
||||||
// see https://github.com/testing-library/user-event/issues/833
|
// see https://github.com/testing-library/user-event/issues/833
|
||||||
user = userEvent.setup({ delay: null });
|
user = userEvent.setup({ delay: null });
|
||||||
|
@ -30,7 +30,7 @@ describe('LogRows', () => {
|
|||||||
|
|
||||||
it('renders rows only limited number of rows first', () => {
|
it('renders rows only limited number of rows first', () => {
|
||||||
const rows: LogRowModel[] = [makeLog({ uid: '1' }), makeLog({ uid: '2' }), makeLog({ uid: '3' })];
|
const rows: LogRowModel[] = [makeLog({ uid: '1' }), makeLog({ uid: '2' }), makeLog({ uid: '3' })];
|
||||||
jest.useFakeTimers('modern');
|
jest.useFakeTimers();
|
||||||
const { rerender } = render(
|
const { rerender } = render(
|
||||||
<LogRows
|
<LogRows
|
||||||
logRows={rows}
|
logRows={rows}
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
"@types/deep-freeze": "^0.1.1",
|
"@types/deep-freeze": "^0.1.1",
|
||||||
"@types/grafana__slate-react": "npm:@types/slate-react@0.22.5",
|
"@types/grafana__slate-react": "npm:@types/slate-react@0.22.5",
|
||||||
"@types/hoist-non-react-statics": "^3.3.1",
|
"@types/hoist-non-react-statics": "^3.3.1",
|
||||||
"@types/jest": "27.5.1",
|
"@types/jest": "28.1.1",
|
||||||
"@types/lodash": "4.14.182",
|
"@types/lodash": "4.14.182",
|
||||||
"@types/prop-types": "15.7.5",
|
"@types/prop-types": "15.7.5",
|
||||||
"@types/react": "17.0.42",
|
"@types/react": "17.0.42",
|
||||||
|
@ -72,7 +72,7 @@ describe('RichHistoryLocalStorage', () => {
|
|||||||
now = new Date(1970, 0, 1);
|
now = new Date(1970, 0, 1);
|
||||||
old = new Date(1969, 0, 1);
|
old = new Date(1969, 0, 1);
|
||||||
|
|
||||||
jest.useFakeTimers('modern');
|
jest.useFakeTimers();
|
||||||
jest.setSystemTime(now);
|
jest.setSystemTime(now);
|
||||||
storage = new RichHistoryLocalStorage();
|
storage = new RichHistoryLocalStorage();
|
||||||
await storage.deleteAll();
|
await storage.deleteAll();
|
||||||
|
@ -154,7 +154,7 @@ describe('backendSrv', () => {
|
|||||||
|
|
||||||
describe('when making an unsuccessful call and conditions for retry are favorable and loginPing does not throw', () => {
|
describe('when making an unsuccessful call and conditions for retry are favorable and loginPing does not throw', () => {
|
||||||
it('then it should retry', async () => {
|
it('then it should retry', async () => {
|
||||||
jest.useFakeTimers('modern');
|
jest.useFakeTimers();
|
||||||
const url = '/api/dashboard/';
|
const url = '/api/dashboard/';
|
||||||
const { backendSrv, appEventsMock, logoutMock, expectRequestCallChain } = getTestContext({
|
const { backendSrv, appEventsMock, logoutMock, expectRequestCallChain } = getTestContext({
|
||||||
ok: false,
|
ok: false,
|
||||||
@ -220,7 +220,7 @@ describe('backendSrv', () => {
|
|||||||
|
|
||||||
describe('when making an unsuccessful call and conditions for retry are favorable and retry throws', () => {
|
describe('when making an unsuccessful call and conditions for retry are favorable and retry throws', () => {
|
||||||
it('then it throw error', async () => {
|
it('then it throw error', async () => {
|
||||||
jest.useFakeTimers('modern');
|
jest.useFakeTimers();
|
||||||
const { backendSrv, appEventsMock, logoutMock, expectRequestCallChain } = getTestContext({
|
const { backendSrv, appEventsMock, logoutMock, expectRequestCallChain } = getTestContext({
|
||||||
ok: false,
|
ok: false,
|
||||||
status: 401,
|
status: 401,
|
||||||
@ -280,7 +280,7 @@ describe('backendSrv', () => {
|
|||||||
|
|
||||||
describe('when making an unsuccessful 422 call', () => {
|
describe('when making an unsuccessful 422 call', () => {
|
||||||
it('then it should emit Validation failed message', async () => {
|
it('then it should emit Validation failed message', async () => {
|
||||||
jest.useFakeTimers('modern');
|
jest.useFakeTimers();
|
||||||
const { backendSrv, appEventsMock, logoutMock, expectRequestCallChain } = getTestContext({
|
const { backendSrv, appEventsMock, logoutMock, expectRequestCallChain } = getTestContext({
|
||||||
ok: false,
|
ok: false,
|
||||||
status: 422,
|
status: 422,
|
||||||
@ -313,7 +313,7 @@ describe('backendSrv', () => {
|
|||||||
|
|
||||||
describe('when making an unsuccessful call and we handle the error', () => {
|
describe('when making an unsuccessful call and we handle the error', () => {
|
||||||
it('then it should not emit message', async () => {
|
it('then it should not emit message', async () => {
|
||||||
jest.useFakeTimers('modern');
|
jest.useFakeTimers();
|
||||||
const { backendSrv, appEventsMock, logoutMock, expectRequestCallChain } = getTestContext({
|
const { backendSrv, appEventsMock, logoutMock, expectRequestCallChain } = getTestContext({
|
||||||
ok: false,
|
ok: false,
|
||||||
status: 404,
|
status: 404,
|
||||||
|
@ -76,7 +76,7 @@ const key = 'grafana.explore.richHistory';
|
|||||||
|
|
||||||
describe('richHistory', () => {
|
describe('richHistory', () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
jest.useFakeTimers('modern');
|
jest.useFakeTimers();
|
||||||
jest.setSystemTime(new Date(1970, 0, 1));
|
jest.setSystemTime(new Date(1970, 0, 1));
|
||||||
|
|
||||||
richHistoryStorageMock.addToRichHistory = jest.fn((r) => {
|
richHistoryStorageMock.addToRichHistory = jest.fn((r) => {
|
||||||
|
@ -37,7 +37,7 @@ describe('Logs', () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
jest.useFakeTimers('modern');
|
jest.useFakeTimers();
|
||||||
});
|
});
|
||||||
|
|
||||||
afterEach(() => {
|
afterEach(() => {
|
||||||
|
@ -19,7 +19,7 @@ jest.mock('app/core/services/search_srv');
|
|||||||
const { mockSearch } = SearchSrv as typeof MockSearchSrv;
|
const { mockSearch } = SearchSrv as typeof MockSearchSrv;
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
jest.useFakeTimers('modern');
|
jest.useFakeTimers();
|
||||||
mockSearch.mockClear();
|
mockSearch.mockClear();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
18
yarn.lock
18
yarn.lock
@ -3992,7 +3992,7 @@ __metadata:
|
|||||||
"@testing-library/user-event": 14.2.0
|
"@testing-library/user-event": 14.2.0
|
||||||
"@types/d3-interpolate": ^1.4.0
|
"@types/d3-interpolate": ^1.4.0
|
||||||
"@types/history": 4.7.11
|
"@types/history": 4.7.11
|
||||||
"@types/jest": 27.5.1
|
"@types/jest": 28.1.1
|
||||||
"@types/jquery": 3.5.14
|
"@types/jquery": 3.5.14
|
||||||
"@types/lodash": 4.14.182
|
"@types/lodash": 4.14.182
|
||||||
"@types/marked": 4.0.3
|
"@types/marked": 4.0.3
|
||||||
@ -4157,7 +4157,7 @@ __metadata:
|
|||||||
"@testing-library/user-event": 14.2.0
|
"@testing-library/user-event": 14.2.0
|
||||||
"@types/angular": 1.8.4
|
"@types/angular": 1.8.4
|
||||||
"@types/history": 4.7.11
|
"@types/history": 4.7.11
|
||||||
"@types/jest": 27.5.1
|
"@types/jest": 28.1.1
|
||||||
"@types/lodash": 4.14.182
|
"@types/lodash": 4.14.182
|
||||||
"@types/react": 17.0.42
|
"@types/react": 17.0.42
|
||||||
"@types/react-dom": 17.0.14
|
"@types/react-dom": 17.0.14
|
||||||
@ -4379,7 +4379,7 @@ __metadata:
|
|||||||
"@types/grafana__slate-react": "npm:@types/slate-react@0.22.5"
|
"@types/grafana__slate-react": "npm:@types/slate-react@0.22.5"
|
||||||
"@types/hoist-non-react-statics": 3.3.1
|
"@types/hoist-non-react-statics": 3.3.1
|
||||||
"@types/is-hotkey": 0.1.7
|
"@types/is-hotkey": 0.1.7
|
||||||
"@types/jest": 27.5.1
|
"@types/jest": 28.1.1
|
||||||
"@types/jquery": 3.5.14
|
"@types/jquery": 3.5.14
|
||||||
"@types/lodash": 4.14.182
|
"@types/lodash": 4.14.182
|
||||||
"@types/mock-raf": 1.0.3
|
"@types/mock-raf": 1.0.3
|
||||||
@ -4583,7 +4583,7 @@ __metadata:
|
|||||||
"@types/deep-freeze": ^0.1.1
|
"@types/deep-freeze": ^0.1.1
|
||||||
"@types/grafana__slate-react": "npm:@types/slate-react@0.22.5"
|
"@types/grafana__slate-react": "npm:@types/slate-react@0.22.5"
|
||||||
"@types/hoist-non-react-statics": ^3.3.1
|
"@types/hoist-non-react-statics": ^3.3.1
|
||||||
"@types/jest": 27.5.1
|
"@types/jest": 28.1.1
|
||||||
"@types/lodash": 4.14.182
|
"@types/lodash": 4.14.182
|
||||||
"@types/prop-types": 15.7.5
|
"@types/prop-types": 15.7.5
|
||||||
"@types/react": 17.0.42
|
"@types/react": 17.0.42
|
||||||
@ -10106,13 +10106,13 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"@types/jest@npm:27.5.1":
|
"@types/jest@npm:28.1.1":
|
||||||
version: 27.5.1
|
version: 28.1.1
|
||||||
resolution: "@types/jest@npm:27.5.1"
|
resolution: "@types/jest@npm:28.1.1"
|
||||||
dependencies:
|
dependencies:
|
||||||
jest-matcher-utils: ^27.0.0
|
jest-matcher-utils: ^27.0.0
|
||||||
pretty-format: ^27.0.0
|
pretty-format: ^27.0.0
|
||||||
checksum: be20e39f7aaf17179109c0060d0a0489cec2034d4e2e28a631284c7ecd13c5ae52f62697a33a0e89b03b6cfe54e9d5e8c2bd387ab2bd90d6071d68c63b86d1e3
|
checksum: 0a8b045a7b660372decc807c390d3f99a2b12bb1659a1cd593afe04557f4b7c235b0576a5e35b1577710d20e42759d3d8755eb8bed6edc8733f47007e75a5509
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
@ -20317,7 +20317,7 @@ __metadata:
|
|||||||
"@types/grafana__slate-react": "npm:@types/slate-react@0.22.5"
|
"@types/grafana__slate-react": "npm:@types/slate-react@0.22.5"
|
||||||
"@types/history": 4.7.11
|
"@types/history": 4.7.11
|
||||||
"@types/hoist-non-react-statics": 3.3.1
|
"@types/hoist-non-react-statics": 3.3.1
|
||||||
"@types/jest": 27.5.1
|
"@types/jest": 28.1.1
|
||||||
"@types/jquery": 3.5.14
|
"@types/jquery": 3.5.14
|
||||||
"@types/js-yaml": ^4.0.5
|
"@types/js-yaml": ^4.0.5
|
||||||
"@types/jsurl": ^1.2.28
|
"@types/jsurl": ^1.2.28
|
||||||
|
Loading…
Reference in New Issue
Block a user