jest-mongodb
jest-mongodb copied to clipboard
[Question] about process.env
Dear vladgolubev,
I'm new into Jest
I would like to ask any reason behind to use a persistent json file to get mongo db_name
mongo_url
, etc.
As I saw this line of code. Why don't we just return process.env.something instead of save into a new json file?
I'm using process.env in my project:
https://github.com/RodolfoSilva/graphql-typescript-server-boilerplate
You can check here:
https://github.com/RodolfoSilva/graphql-typescript-server-boilerplate/blob/master/scripts/jest-globalSetup.js
Is there a way to customize the name of the variable? in my case I use MONGODB_URL
because that's the name Now.sh set on deploy, and Heroku use MONGODB_URI
@leosuncin you can make little pr to set variable name from the configuration ;)