NODE_ENV with Jest
问题 I am migrating from Mocha to Jest. My test import the 'config' package, which selects a configuration file or another depending on the NODE_ENV variable. However, it looks like NODE_ENV variable is found by config while running the test from Jest Next line does not work (that is, NODE_ENV is ignored): NODE_ENV=test jest test/*.js --notify --config jest.config.json As a consequence the 'config' package reports: console.error node_modules/config/lib/config.js:1727 WARNING: NODE_ENV value of