Skip to content
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

Localize test setup #63

Merged
merged 1 commit into from
Feb 3, 2025
Merged

Localize test setup #63

merged 1 commit into from
Feb 3, 2025

Conversation

lencioni
Copy link
Contributor

@lencioni lencioni commented Feb 3, 2025

I wanted to run the controller test on its own, but it failed because
these env vars were set in the shell script. I started by adding a
setup.js file and importing it in all of the tests but then I realized
that we only need to do this in the controller test so I moved it there.
To make this work, we need to read the env vars lazily and not in the
module scope, so I did some light refactoring as well.

I had started to convert the tests to ESM but that ended up being a
rabbit hole of sorts and not something I need to do right now.

I wanted to run the controller test on its own, but it failed because
these env vars were set in the shell script. I started by adding a
setup.js file and importing it in all of the tests but then I realized
that we only need to do this in the controller test so I moved it there.
To make this work, we need to read the env vars lazily and not in the
module scope, so I did some light refactoring as well.
@lencioni lencioni changed the title Localize test setup and use ESM for tests Localize test setup Feb 3, 2025
@lencioni lencioni merged commit ccd20dd into main Feb 3, 2025
5 checks passed
@lencioni lencioni deleted the test-setup branch February 3, 2025 17:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant