{"_id":"env-test","_rev":"6-2125f88c1b2954717625d179d6a9b1ec","name":"env-test","description":"Sets NODE_ENV to 'test'","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"env-test","version":"1.0.0","description":"Sets NODE_ENV to 'test'","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"https://github.com/lmtm/node-env-test.git"},"keywords":["mocha","env","test"],"author":{"name":"Nicolas Chambrier","email":"naholyr@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/lmtm/node-env-test/issues"},"homepage":"https://github.com/lmtm/node-env-test","gitHead":"e97fa2b1fb29c34a25a7a55051c2a3955b2605e4","_id":"env-test@1.0.0","_shasum":"8f658c1414b7eeeb6f67ed199180376c96515ca6","_from":".","_npmVersion":"1.4.14","_npmUser":{"name":"naholyr","email":"naholyr@gmail.com"},"maintainers":[{"name":"naholyr","email":"naholyr@gmail.com"}],"dist":{"shasum":"8f658c1414b7eeeb6f67ed199180376c96515ca6","tarball":"https://registry.npmjs.org/env-test/-/env-test-1.0.0.tgz","integrity":"sha512-OBA+y3XKFzO363wYmA3BbA3nigmEm5acuGCK7wJ3jsHd8IrJVpNMcCaKpqsLM1N3cgISUSp3K6tNkibGHrx4wQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIF3cD40qytEynagaz3uo6IbEeUpQneaWOPY425oGH/eQAiAsagRcEFbwshMx8hY6uszQ0gIWuOdrBDSswhK+2ZfCFw=="}]}}},"readme":"node-env-test\n=============\n\nSet `$NODE_ENV` to \"test\".\n\nWorks best with `mocha --require=env-test`.\n\nWhy?\n----\n\nBecause to force environment, I was used to add `process.env.NODE_ENV = \"test\"` at the beginning of every test file.\n\nBecause relying on `Makefile` or `package.json` to set this environment is almost always OK, but when one user just throws `mocha` in his terminal we don't want to punish him with data loss or any other hell.\n\nWhereas relying on `mocha.opts` makes it easy (no more ugly line in each test file) and reliable (always loaded).\n\nHow?\n----\n\n* Install with `npm install --save-dev env-test`\n* Edit `test/mocha.opts` and add the line `--require=env-test`\n","maintainers":[{"name":"naholyr","email":"naholyr@gmail.com"}],"time":{"modified":"2022-06-17T06:32:24.821Z","created":"2014-07-15T14:21:12.620Z","1.0.0":"2014-07-15T14:21:12.620Z"},"homepage":"https://github.com/lmtm/node-env-test","keywords":["mocha","env","test"],"repository":{"type":"git","url":"https://github.com/lmtm/node-env-test.git"},"author":{"name":"Nicolas Chambrier","email":"naholyr@gmail.com"},"bugs":{"url":"https://github.com/lmtm/node-env-test/issues"},"license":"MIT","readmeFilename":"README.md","users":{"oncletom":true,"jonathas":true}}