Skip to content

node env is not take into debug mode #1106

@sebbi08

Description

@sebbi08

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):
...@3.7.0
├─┬ ..../eslint-config-ts@1.6.6
│ └─┬ eslint-plugin-jest@27.6.0
│   └── jest@29.7.0 deduped
├─┬ ...@3.7.0 -> ./
│ └── jest@29.7.0 deduped
├── jest@29.7.0
└─┬ ts-jest@29.1.1
  └── jest@29.7.0 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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions