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

test: switch to vitest #252

Merged
merged 4 commits into from
Aug 7, 2023
Merged

test: switch to vitest #252

merged 4 commits into from
Aug 7, 2023

Conversation

zOadT
Copy link
Collaborator

@zOadT zOadT commented Aug 6, 2023

I don't think there is a reason to use the _ASSERT anymore since we switched to TypeScript. In the worst case the variables are undefined which should still be fine for us.

EDIT: Turns out tests can be a problem, but I guess it's a good idea to switch to vitest now anyway? 😅

@zOadT zOadT closed this Aug 6, 2023
@zOadT zOadT reopened this Aug 6, 2023
@zOadT zOadT changed the title refactor: use env variables directly test: switch to vitest Aug 6, 2023
@shakiba
Copy link
Collaborator

shakiba commented Aug 6, 2023

When you directly use a global variable and it is undefined, it throws an exception. So the safe way to use them is to first check if they are defined, or do something like process.env.NAME.

Copy link
Collaborator

@shakiba shakiba left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test updates looks great!
Global config variables needs to check for undefined as before.

@shakiba shakiba merged commit 652eb41 into master Aug 7, 2023
1 check passed
@zOadT zOadT deleted the simplify-env-handling branch August 8, 2023 05:30
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.

2 participants