Merge pull request #920 from spotify/eide/bump-jest-26

Bump to jest 26.0.1
This commit is contained in:
Marcus Eide
2020-05-19 15:15:39 +02:00
committed by GitHub
24 changed files with 936 additions and 60 deletions
+1 -1
View File
@@ -33,7 +33,7 @@
"@testing-library/jest-dom": "^5.7.0",
"@testing-library/react": "^9.3.2",
"@testing-library/user-event": "^10.2.4",
"@types/jest": "^25.2.1",
"@types/jest": "^25.2.2",
"@types/node": "^12.0.0",
"@types/testing-library__jest-dom": "^5.0.4",
"jest-fetch-mock": "^3.0.3"
+1 -1
View File
@@ -34,7 +34,7 @@
"@testing-library/jest-dom": "^5.7.0",
"@testing-library/react": "^9.3.2",
"@testing-library/user-event": "^10.2.4",
"@types/jest": "^25.2.1",
"@types/jest": "^25.2.2",
"@types/node": "^12.0.0",
"@types/testing-library__jest-dom": "^5.0.4",
"jest-fetch-mock": "^3.0.3"
+1 -1
View File
@@ -49,7 +49,7 @@
"@testing-library/react": "^9.3.2",
"@testing-library/user-event": "^10.2.4",
"@types/codemirror": "^0.0.93",
"@types/jest": "^25.2.1",
"@types/jest": "^25.2.2",
"@types/node": "^12.0.0",
"@types/testing-library__jest-dom": "^5.0.4",
"jest-fetch-mock": "^3.0.3",
+1 -1
View File
@@ -32,7 +32,7 @@
"@testing-library/jest-dom": "^5.7.0",
"@testing-library/react": "^9.3.2",
"@testing-library/user-event": "^10.2.4",
"@types/jest": "^25.2.1",
"@types/jest": "^25.2.2",
"@types/node": "^12.0.0",
"@types/testing-library__jest-dom": "^5.0.4",
"jest-fetch-mock": "^3.0.3",
+1 -1
View File
@@ -35,7 +35,7 @@
"@testing-library/jest-dom": "^5.7.0",
"@testing-library/react": "^9.3.2",
"@testing-library/user-event": "^10.2.4",
"@types/jest": "^25.2.1",
"@types/jest": "^25.2.2",
"@types/node": "^12.0.0",
"@types/testing-library__jest-dom": "^5.0.4",
"jest-fetch-mock": "^3.0.3"
@@ -15,12 +15,13 @@
*/
jest.mock('react-router-dom', () => {
const actual = jest.requireActual('react-router-dom');
const mocks = {
replace: jest.fn(),
push: jest.fn(),
};
return {
...jest.requireActual('react-router-dom'),
...actual,
useHistory: jest.fn(() => mocks),
};
});
@@ -41,7 +42,7 @@ import AuditList from '.';
import * as data from '../../__fixtures__/website-list-response.json';
const { useHistory } = require.requireMock('react-router-dom');
const { useHistory } = jest.requireMock('react-router-dom');
const websiteListResponse = data as WebsiteListResponse;
describe('AuditList', () => {
@@ -16,10 +16,13 @@
/* eslint-disable jest/no-disabled-tests */
jest.mock('react-router-dom', () => ({
...jest.requireActual('react-router-dom'),
useParams: jest.fn(() => ({})),
}));
jest.mock('react-router-dom', () => {
const actual = jest.requireActual('react-router-dom');
return {
...actual,
useParams: jest.fn(() => ({})),
};
});
import React from 'react';
import mockFetch from 'jest-fetch-mock';
@@ -32,7 +35,7 @@ import { lighthouseApiRef, LighthouseRestApi, Audit, Website } from '../../api';
import { formatTime } from '../../utils';
import * as data from '../../__fixtures__/website-response.json';
const { useParams }: { useParams: jest.Mock } = require.requireMock(
const { useParams }: { useParams: jest.Mock } = jest.requireMock(
'react-router-dom',
);
const websiteResponse = data as Website;
@@ -15,12 +15,13 @@
*/
jest.mock('react-router-dom', () => {
const actual = jest.requireActual('react-router-dom');
const mocks = {
replace: jest.fn(),
push: jest.fn(),
};
return {
...jest.requireActual('react-router-dom'),
...actual,
useHistory: jest.fn(() => mocks),
};
});
@@ -41,7 +42,7 @@ import { lighthouseApiRef, LighthouseRestApi, Audit } from '../../api';
import CreateAudit from '.';
import * as data from '../../__fixtures__/create-audit-response.json';
const { useHistory }: { useHistory: jest.Mock } = require.requireMock(
const { useHistory }: { useHistory: jest.Mock } = jest.requireMock(
'react-router-dom',
);
const createAuditResponse = data as Audit;
+1 -1
View File
@@ -33,7 +33,7 @@
"@testing-library/jest-dom": "^5.7.0",
"@testing-library/react": "^9.3.2",
"@testing-library/user-event": "^10.2.4",
"@types/jest": "^25.2.1",
"@types/jest": "^25.2.2",
"@types/node": "^12.0.0",
"@types/testing-library__jest-dom": "^5.0.4",
"jest-fetch-mock": "^3.0.3"
+1 -1
View File
@@ -32,7 +32,7 @@
"@testing-library/jest-dom": "^5.7.0",
"@testing-library/react": "^9.3.2",
"@testing-library/user-event": "^10.2.4",
"@types/jest": "^25.2.1",
"@types/jest": "^25.2.2",
"@types/node": "^12.0.0",
"@types/testing-library__jest-dom": "^5.0.4",
"jest-fetch-mock": "^3.0.3"
+1 -1
View File
@@ -38,7 +38,7 @@
"@testing-library/user-event": "^10.2.4",
"@types/color": "^3.0.1",
"@types/d3-force": "^1.2.1",
"@types/jest": "^25.2.1",
"@types/jest": "^25.2.2",
"@types/node": "^12.0.0",
"@types/testing-library__jest-dom": "^5.0.4",
"jest-fetch-mock": "^3.0.3"
+1 -1
View File
@@ -33,7 +33,7 @@
"@testing-library/jest-dom": "^5.7.0",
"@testing-library/react": "^9.3.2",
"@testing-library/user-event": "^10.2.4",
"@types/jest": "^25.2.1",
"@types/jest": "^25.2.2",
"@types/node": "^12.0.0",
"@types/testing-library__jest-dom": "^5.0.4",
"jest-fetch-mock": "^3.0.3"