diff --git a/package.json b/package.json index 4c8400b599..c28ea6ce74 100644 --- a/package.json +++ b/package.json @@ -54,7 +54,8 @@ "test-coverage": "run-s test-build-coverage test-serve-coverage", "test-alex": "alex ./docs-* *.md", "test-lockfile": "lockfile-lint --path yarn.lock --allowed-hosts yarn --validate-https", - "test-debug": "node --inspect-brk node_modules/.bin/jest --runInBand" + "test-debug": "node --inspect-brk node_modules/.bin/jest --runInBand", + "postinstall": "patch-package" }, "license": "MPL-2.0", "repository": { @@ -123,7 +124,7 @@ "@testing-library/react": "^16.3.0", "alex": "^11.0.1", "autoprefixer": "^10.4.21", - "babel-jest": "^29.7.0", + "babel-jest": "^30.0.0", "babel-loader": "^10.0.0", "babel-plugin-module-resolver": "^5.0.2", "browserslist": "^4.25.0", @@ -152,8 +153,8 @@ "glob": "^11.0.3", "html-webpack-plugin": "^5.6.3", "husky": "^4.3.8", - "jest": "^29.7.0", - "jest-environment-jsdom": "^29.7.0", + "jest": "^30.0.0", + "jest-environment-jsdom": "^30.0.0", "jest-extended": "^6.0.0", "json-loader": "^0.5.7", "local-web-server": "^5.4.0", @@ -161,8 +162,10 @@ "mkdirp": "^3.0.1", "npm-run-all2": "^8.0.4", "open": "^10.1.2", + "patch-package": "^8.0.0", "postcss": "^8.5.4", "postcss-loader": "^8.1.1", + "postinstall-postinstall": "^2.1.0", "prettier": "^3.5.3", "raw-loader": "^4.0.2", "rimraf": "^5.0.10", diff --git a/patches/jsdom+26.1.0.patch b/patches/jsdom+26.1.0.patch new file mode 100644 index 0000000000..b0f94ed3d2 --- /dev/null +++ b/patches/jsdom+26.1.0.patch @@ -0,0 +1,13 @@ +diff --git a/node_modules/jsdom/lib/jsdom/browser/Window.js b/node_modules/jsdom/lib/jsdom/browser/Window.js +index 52d011c..5b29f5a 100644 +--- a/node_modules/jsdom/lib/jsdom/browser/Window.js ++++ b/node_modules/jsdom/lib/jsdom/browser/Window.js +@@ -507,7 +507,7 @@ function installOwnProperties(window, options) { + // [LegacyUnforgeable]: + window: { configurable: false }, + document: { configurable: false }, +- location: { configurable: false }, ++ location: { configurable: true }, + top: { configurable: false } + }); + diff --git a/src/test/components/NetworkChart.test.js b/src/test/components/NetworkChart.test.js index 9d686810ed..533ebba7bb 100644 --- a/src/test/components/NetworkChart.test.js +++ b/src/test/components/NetworkChart.test.js @@ -455,7 +455,7 @@ describe('NetworkChartRowBar phase calculations', function () { const barStyles = getBarElementStyles(); expect(barStyles).toHaveLength(2); expect(barStyles).toEqual([ - 'width: 40px; left: -18870px;', + 'left: -18870px; width: 40px;', 'width: 198px; left: 150px;', ]); }); @@ -485,7 +485,7 @@ describe('NetworkChartRowBar phase calculations', function () { const barStyles = getBarElementStyles(); expect(barStyles).toHaveLength(2); expect(barStyles).toEqual([ - 'width: 40px; left: -18870px;', + 'left: -18870px; width: 40px;', 'width: 198px; left: 150px;', ]); }); diff --git a/src/test/components/__snapshots__/CallTreeSidebar.test.js.snap b/src/test/components/__snapshots__/CallTreeSidebar.test.js.snap index c17c361633..e313cdf49b 100644 --- a/src/test/components/__snapshots__/CallTreeSidebar.test.js.snap +++ b/src/test/components/__snapshots__/CallTreeSidebar.test.js.snap @@ -1,4 +1,4 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP +// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing exports[`CallTreeSidebar can expand subcategories 1`] = `