nicolo-ribaudo / jest-light-runner

A Jest runner that runs tests directly in bare Node.js, without virtualizing the environment.
MIT License
227 stars 24 forks source link

Add JEST_WORKER_ID to runner environment #58

Open silverwind opened 2 years ago

silverwind commented 2 years ago

This environment variable is often used to detect whether app code runs inside Jest, it's good to have it for compatibilty (and to allow me to skip having to deal with module mocks).

Edit: I just found out about NODE_ENV=test which already works with this runner, so I'll be using that. You decide whether you want this 😉.