Skip to content

Commit 34cb202

Browse files
wardpeetLekoArtsgatsbybot
authored
chore: upgrade jest (#33277)
Co-authored-by: LekoArts <[email protected]> Co-authored-by: gatsbybot <[email protected]>
1 parent ae2ffe8 commit 34cb202

File tree

79 files changed

+2144
-2983
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+2144
-2983
lines changed

.github/actions/high-priority-prs/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@
1414
"lodash": "^4.17.15"
1515
},
1616
"devDependencies": {
17-
"jest": "^25.1.0"
17+
"jest": "^27.2.1"
1818
}
1919
}

.jestSetup.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
11
process.env.GATSBY_RECIPES_NO_COLOR = "true"
2+
3+
// Potrace has a dependency on giwrap which has a process.nextTick as a sideEffect which messes up with jest.
4+
jest.mock(`gifwrap`, () => jest.fn())

deprecated-packages/gatsby-recipes/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
"hicat": "^0.8.0",
4242
"is-binary-path": "^2.1.0",
4343
"is-url": "^1.2.4",
44-
"jest-diff": "^25.5.0",
44+
"jest-diff": "^27.2.0",
4545
"lock": "^1.0.0",
4646
"lodash": "^4.17.21",
4747
"mitt": "^1.2.0",

deprecated-packages/gatsby-recipes/src/providers/utils/get-diff.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import diff from "jest-diff"
1+
import { diff } from "jest-diff"
22
import chalk from "chalk"
33
import stripAnsi from "strip-ansi"
44

examples/using-jest/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@
3535
"babel-jest": "^24.9.0",
3636
"babel-preset-gatsby": "^0.5.10",
3737
"identity-obj-proxy": "^3.0.0",
38-
"jest": "^24.9.0"
38+
"jest": "^27.2.1"
3939
},
4040
"repository": {
4141
"type": "git",
4242
"url": "https://github.com/gatsbyjs/gatsby"
4343
}
44-
}
44+
}

integration-tests/artifacts/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
},
2020
"devDependencies": {
2121
"fs-extra": "^9.0.0",
22-
"jest": "^24.0.0"
22+
"jest": "^27.2.1"
2323
},
2424
"repository": {
2525
"type": "git",

integration-tests/cache-resilience/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"fs-extra": "^9.0.1",
2222
"gatsby-core-utils": "^3.0.0-next.0",
2323
"glob": "^7.1.6",
24-
"jest": "^24.0.0",
24+
"jest": "^27.2.1",
2525
"jest-serializer-path": "^0.1.15",
2626
"lodash": "^4.17.20",
2727
"slash": "^3.0.0",
Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
const babelPreset = require(`babel-preset-gatsby-package`)()
2-
module.exports = require(`babel-jest`).createTransformer({
3-
...babelPreset,
1+
const babelJest = require(`babel-jest`)
2+
3+
module.exports = babelJest.default.createTransformer({
4+
presets: [`babel-preset-gatsby-package`],
45
})

integration-tests/functions/package.json

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44
"private": true,
55
"description": "functions",
66
"author": "Kyle Mathews",
7-
"keywords": ["gatsby"],
7+
"keywords": [
8+
"gatsby"
9+
],
810
"scripts": {
911
"build": "gatsby build",
1012
"develop": "gatsby develop",
@@ -17,16 +19,16 @@
1719
"test": "npm-run-all -s build test-prod test-dev"
1820
},
1921
"devDependencies": {
20-
"babel-jest": "^24.0.0",
21-
"babel-preset-gatsby-package": "^1.3.0",
22-
"fs-extra": "^9.0.0",
23-
"jest": "^24.0.0",
22+
"babel-jest": "^27.4.5",
23+
"babel-preset-gatsby-package": "^2.4.0",
24+
"fs-extra": "^10.0.0",
25+
"jest": "^27.2.1",
2426
"npm-run-all": "4.1.5",
2527
"start-server-and-test": "^1.11.3"
2628
},
2729
"dependencies": {
2830
"gatsby": "next",
29-
"gatsby-plugin-gatsby-cloud": "^2.5.0-next.0",
31+
"gatsby-plugin-gatsby-cloud": "next",
3032
"react": "^17.0.1",
3133
"react-dom": "^17.0.1"
3234
}
Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
const babelPreset = require(`babel-preset-gatsby-package`)()
2-
module.exports = require(`babel-jest`).createTransformer({
3-
...babelPreset,
1+
const babelJest = require(`babel-jest`)
2+
3+
module.exports = babelJest.default.createTransformer({
4+
presets: [`babel-preset-gatsby-package`],
45
})

0 commit comments

Comments
 (0)