-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: remove env variable dependencies from tests #4471
Conversation
✅ Deploy Preview for partners-bloom-dev ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for bloom-exygy-dev ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
@ludtkemorgan It does seem surprising to me to see references to setting environment variables within individual tests. I understand having a set of explicit variables set somewhere in a test environment as it boots up, but I think it feels fragile to be referencing env vars at all in the code of unit tests. |
10df8be
to
cafe3e1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Functionally this looks good, not sure how you think of Jared's comment
@jaredcwhite If you run the tests locally right now it expects your local .env file to contain the appropriate variables. So if you are missing some (or in some cases have the wrong value) the tests would fail locally. This PR does a few things:
As for your question about unit tests, my thought was this makes it less flaky since it will be the same in all environments - locally and deployed. Also it gives us the benefit of testing scenarios where the environment variable is something different. We can talk about this more in standup or a eng workshop |
cafe3e1
to
b6bcd1e
Compare
b6bcd1e
to
334852b
Compare
This PR addresses #4419
Description
When setting up the circle-ci for the new forked Detroit repo I noticed there was a heavy reliance on environment variables in order to work.
This PR does the following:
How Can This Be Tested/Reviewed?
This is hard to show that it works locally and also the circle-ci run of this PR will still have all of the previously saved environment variables.
I tested this by creating a PR in bloom-detroit and didn't add any env variables to the circle-ci UI. bloom-housing#1
Author Checklist:
yarn generate:client
and/or created a migration when requiredReview Process: