Closed as not planned
Closed as not planned
Description
Version
29.6.2
Steps to reproduce
- Install Node.js v18.17.0 on Windows.
- Run the following commands in Git Bash:
mkdir jest-force-color
cd jest-force-color
npm install -D jest
echo 'test("color", () => expect(process.env.FORCE_COLOR).toBeUndefined());' > first.test.js
cp first.test.js second.test.js
- Open either Git Bash, cmd or PowerShell.
- Make sure the
FORCE_COLOR
environment variable is unset. - Run the following command:
npx jest --no-cache
Expected behavior
I expect the tests to pass.
Actual behavior
Instead, both of them fail because the value of process.env.FORCE_COLOR
is '1'
.
Additional context
The issue is not present when using Node.js versions prior to v18.17.0. I believe the fact it appears after the upgrade is due to nodejs/node#48034.
The upgrade broke tests in tj/commander.js checking the output of node
child processes, and it was quite hard to figure out what the reason was.
Environment
System:
OS: Windows 10 10.0.19045
CPU: (8) x64 Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz
Binaries:
Node: 18.17.0 - C:\Program Files\nodejs\node.EXE
Yarn: 1.22.19 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
npm: 9.8.1 - C:\Program Files\nodejs\npm.CMD
npmPackages:
jest: ^29.6.2 => 29.6.2