forked from dotenv-rs/dotenv
-
Notifications
You must be signed in to change notification settings - Fork 42
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
Testing infrastructure #58
Labels
tests
Testing
Comments
Sounds good! Thanks for taking this on. |
This was referenced Jul 23, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The current testing infrastructure is lacking. We have many similar functions:
dotenv
,from_filename
,from_path
,from_read
and theiroverride
anditer
variants; but only thedotenv
function is being tested for expected behaviour (multiline comments, BOM ignoring etc). I believe having these tests on each function is important to avoid future regressions and ensure the stability of the crate.We could simply add these tests for each function but it would create an unmaintainable mess of the
tests
folder. Currently, each test must be in its own file (process) to avoid variable collisions (as the tested functions alter the process environment). Moreover, the output fromcargo test
will get even more unwieldy that it currently is.I prepose a 2-part solution:
The second part is a bit harder: we want it to be easy to add more checks AND easy to add the checks to a new public function. They should also be easy to change.
The text was updated successfully, but these errors were encountered: