-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Open
Description
As raised by nodejs/node#60677 (comment) and reproduced locally:
% node --version
v25.2.0
% npm t
...
FAIL tests/argument.required.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: 110 failed, 110 total
CITGM search for Commander on: https://ci.nodejs.org/job/citgm-smoker/lastCompletedBuild/testReport/
The issue is potentially triggered by jest accessing local storage. An older similar issue is: jestjs/jest#12813
A work-around of sorts (for macOS and Linux) is changing script invocation to:
"test": "NODE_OPTIONS='--localstorage-file=./test-localstorage.db' jest && npm run check:type:ts",
But triggers a Jest warning:
● Validation Warning:
Unknown option "nodeOptions" with value ["--localstorage-file=./test-localstorage.db"] was found.
This is probably a typing mistake. Fixing it will remove this message.
Configuration Documentation:
https://jestjs.io/docs/configuration
abetomo
Metadata
Metadata
Assignees
Labels
No labels