-
-
Notifications
You must be signed in to change notification settings - Fork 6.6k
Open
Labels
Description
Version
30.2.0
Steps to reproduce
Reproduction steps:
- Clone https://github.com/shadowspawn/jest-local-storage
- using node 25.2.0...
- npm install
- npx jest
Expected behavior
I expect the tests to run and pass.
Actual behavior
% npx jest
FAIL ./index.test.js
● Test suite failed to run
SecurityError: Cannot initialize local storage without a `--localstorage-file` path
at new NodeEnvironment (node_modules/jest-environment-node/build/index.js:110:52)
Test Suites: 1 failed, 1 total
Tests: 0 total
Snapshots: 0 total
Time: 0.029 s
Ran all test suites.Additional context
I am using testEnvironment: "node".
There was a change of behaviour in nodejs/node#60351
This failed the node CITGM test for Commander: nodejs/node#60677 (comment)
After reproducing, I opened an issue for Commander: tj/commander.js#2451
And then added a reproduction here!
Environment
System:
OS: macOS 26.1
CPU: (10) arm64 Apple M1 Pro
Binaries:
Node: 25.2.0 - /usr/local/bin/node
npm: 11.6.2 - /usr/local/bin/npm
bun: 1.2.1 - /opt/homebrew/bin/bun
Deno: 2.1.7 - /opt/homebrew/bin/deno
npmPackages:
jest: ^30.2.0 => 30.2.0justinvp, richardgarnier, tnotheis, jkoenig134, hexxone and 12 more