Open orangejulius opened 8 years ago
see setup()
and teardown()
functions here for an example of how to avoid this issue.
It might be best to create a more formal way of enforcing the default config during testing across all our repos.
We've started using proxyquire in some places with relatively good results. I like that it completely removes any dependency on the actual pelias-config code, the filesystem, and env vars
I set
PELIAS_CONFIG
in my.bashrc
file so thatpelias.json
does not clutter up my home directory. However, I have to unset that variable in order for the tests to pass.