Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

node env is not take into debug mode #1106

Open
sebbi08 opened this issue Jan 24, 2024 · 1 comment
Open

node env is not take into debug mode #1106

sebbi08 opened this issue Jan 24, 2024 · 1 comment

Comments

@sebbi08
Copy link

sebbi08 commented Jan 24, 2024

Environment

  1. vscode-jest version: v6.1.1
  2. node -v: v20.10.0
  3. npm -v or yarn --version: 10.2.3
  4. npm ls jest or npm ls react-scripts (if you haven’t ejected):
[email protected]
├─┬ ..../[email protected]
│ └─┬ [email protected]
│   └── [email protected] deduped
├─┬ [email protected] -> ./
│ └── [email protected] deduped
├── [email protected]
└─┬ [email protected]
  └── [email protected] deduped
  1. your vscode-jest settings if customized:
  2. Operating system: ubuntu (WSL2)

Prerequisite

  • are you able to run jest test from the command line? yes
  • how do you run your tests from the command line? (for example: npm run test or node_modules/.bin/jest) npx jest

Steps to Reproduce

  1. set the setting

"jest.nodeEnv": {
"MYENV": "TRUE"
}

  1. use that property in a test

When running the test without debugging, it works and the env variable is set in the process.
But when using the debugging, the env variable is empty.

@connectdotz
Copy link
Collaborator

That's true and I agree we should take care of this. Meanwhile, you can fix it with a custom debug config.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants