Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: os.Unsetenv affects global state (#5)
* test: os.Unsetenv affects global state This change adds a helper function that guarantees the cleanup of environment variables. For each applicable test function, we run this at the start, and at the end through a `defer` keyword. Previously, we were unsetting the environment variable within the test, though there is a risk that since global state is being manipulated, we may run into a flakey test where an environment variable is inadvertently lingering. * test: use unsetEnv helper to manage global state --------- Co-authored-by: James Telfer <[email protected]>
- Loading branch information