Skip to content

Commit b1d2b83

Browse files
mattzeunertpaulirish
authored andcommitted
tests: upgrade jest to fix current node 11 build (#7413)
1 parent 5674d61 commit b1d2b83

File tree

4 files changed

+1204
-694
lines changed

4 files changed

+1204
-694
lines changed

jest.config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ module.exports = {
1414
'!**/test/',
1515
'!**/scripts/',
1616
],
17-
setupTestFrameworkScriptFile: './lighthouse-core/test/test-utils.js',
17+
setupFilesAfterEnv: ['./lighthouse-core/test/test-utils.js'],
1818
testEnvironment: 'node',
1919
testMatch: [
2020
'**/lighthouse-core/**/*-test.js',

lighthouse-core/test/computed/manifest-values-test.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ describe('ManifestValues computed artifact', () => {
6666
assert.equal(results.allChecks.every(i => i.passing), true, 'not all checks passed');
6767
});
6868

69-
describe('color checks', async () => {
69+
describe('color checks', () => {
7070
it('fails when a minimal manifest contains no background_color', async () => {
7171
const WebAppManifest = noUrlManifestParser(JSON.stringify({
7272
start_url: '/',
@@ -120,7 +120,7 @@ describe('ManifestValues computed artifact', () => {
120120
});
121121
});
122122

123-
describe('icons checks', async () => {
123+
describe('icons checks', () => {
124124
describe('icons exist check', () => {
125125
it('fails when a manifest contains no icons array', async () => {
126126
const manifestSrc = JSON.stringify({

package.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@
8181
"@types/google.analytics": "0.0.39",
8282
"@types/inquirer": "^0.0.35",
8383
"@types/intl-messageformat": "^1.3.0",
84-
"@types/jest": "^23.3.10",
84+
"@types/jest": "^24.0.9",
8585
"@types/jpeg-js": "^0.3.0",
8686
"@types/lodash.isequal": "^4.5.2",
8787
"@types/make-dir": "^1.0.3",
@@ -115,7 +115,7 @@
115115
"glob": "^7.1.3",
116116
"idb-keyval": "2.2.0",
117117
"intl": "^1.2.5",
118-
"jest": "^23.6.0",
118+
"jest": "^24.3.0",
119119
"jsdom": "^12.2.0",
120120
"make-dir": "^1.3.0",
121121
"mocha": "^3.2.0",
@@ -143,6 +143,7 @@
143143
"inquirer": "^3.3.0",
144144
"intl-messageformat": "^2.2.0",
145145
"intl-messageformat-parser": "^1.4.0",
146+
"jest-mock": "^24.3.0",
146147
"jpeg-js": "0.1.2",
147148
"js-library-detector": "^5.1.0",
148149
"lighthouse-logger": "^1.2.0",

0 commit comments

Comments
 (0)