Skip to content

Commit

Permalink
deps(jest): upgrade to 27.0.3 (#12454)
Browse files Browse the repository at this point in the history
  • Loading branch information
connorjclark committed Jun 2, 2021
1 parent 7a4a317 commit cea31a1
Show file tree
Hide file tree
Showing 7 changed files with 852 additions and 626 deletions.
14 changes: 9 additions & 5 deletions clients/test/lightrider-entry-test.js
Expand Up @@ -119,17 +119,21 @@ describe('lightrider-entry', () => {
runStub.mockRestore();
});

let originalRun;
beforeEach(() => {
originalRun = Runner.run;
});
afterEach(() => {
Runner.run = originalRun;
});

it('exposes artifacts when logAssets is true', async () => {
const originalRun = Runner.run;
Runner.run = jest.fn().mockReturnValue(Promise.resolve({
Runner.run = jest.fn(Runner.run).mockReturnValue(Promise.resolve({
lhr: {},
artifacts: {
Artifact: new Error('some error'),
},
}));
afterEach(() => {
Runner.run = originalRun;
});

const mockConnection = {};
const url = 'https://example.com';
Expand Down
1 change: 1 addition & 0 deletions jest.config.js
Expand Up @@ -32,4 +32,5 @@ module.exports = {
'**/docs/**/*.test.js',
],
transform: {},
prettierPath: null,
};
Expand Up @@ -103,7 +103,6 @@ describe('ReportUIFeatures', () => {
global.I18n = undefined;
global.ReportUIFeatures = undefined;
global.matchMedia = undefined;
global.self.matchMedia = undefined;
global.CriticalRequestChainRenderer = undefined;
global.DetailsRenderer = undefined;
global.CategoryRenderer = undefined;
Expand Down
2 changes: 1 addition & 1 deletion lighthouse-treemap/test/treemap-test-pptr.js
Expand Up @@ -37,7 +37,7 @@ describe('Lighthouse Treemap', () => {

afterAll(async function() {
await Promise.all([
new Promise(resolve => server.close(resolve)),
server.close(),
browser && browser.close(),
]);
});
Expand Down
2 changes: 1 addition & 1 deletion lighthouse-viewer/test/viewer-test-pptr.js
Expand Up @@ -79,7 +79,7 @@ describe('Lighthouse Viewer', () => {
if (pageErrors.length > 0) console.error(pageErrors);

await Promise.all([
new Promise(resolve => server.close(resolve)),
server.close(),
browser && browser.close(),
]);
});
Expand Down
3 changes: 1 addition & 2 deletions package.json
Expand Up @@ -140,7 +140,7 @@
"glob": "^7.1.3",
"idb-keyval": "2.2.0",
"intl-messageformat-parser": "^1.8.1",
"jest": "^26.6.1",
"jest": "^27.0.3",
"jsdom": "^12.2.0",
"jsonld": "^5.2.0",
"jsonlint-mod": "^1.7.6",
Expand All @@ -150,7 +150,6 @@
"npm-run-posix-or-windows": "^2.0.2",
"package-json-versionify": "^1.0.4",
"pako": "^2.0.3",
"prettier": "^1.14.3",
"pretty-json-stringify": "^0.0.2",
"puppeteer": "^9.1.1",
"tabulator-tables": "^4.9.3",
Expand Down

0 comments on commit cea31a1

Please sign in to comment.