From 2d9fb7f83bf7691cfc853674301c285f9f069d6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Ribaudo?= Date: Sat, 11 Dec 2021 17:31:54 +0100 Subject: [PATCH] Pin `jest-worker` to `27.2.1` in CRA e2e tests (#14040) --- .../integration-tests/e2e-create-react-app.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/scripts/integration-tests/e2e-create-react-app.sh b/scripts/integration-tests/e2e-create-react-app.sh index 0076fa3dbf..92e5615357 100755 --- a/scripts/integration-tests/e2e-create-react-app.sh +++ b/scripts/integration-tests/e2e-create-react-app.sh @@ -45,7 +45,23 @@ if [[ "$(node --version)" == v17.* ]]; then export NODE_OPTIONS=--openssl-legacy-provider fi +# Remove this when https://github.com/facebook/jest/pull/12128 is fixed +node -e " + var pkg = require('./package.json'); + + pkg.resolutions = { + 'jest-worker': '27.3.1' + }; + + fs.writeFileSync('./package.json', JSON.stringify(pkg, null, 2)); +" + startLocalRegistry "$PWD"/../../verdaccio-config.yml + +# Remove these when https://github.com/facebook/jest/pull/12128 is fixed +npm install --ignore-scripts +npx npm-force-resolutions + npm install # Test