-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Closed
Labels
feat: browserIssues and PRs related to the browser runnerIssues and PRs related to the browser runnerp2-nice-to-haveNot breaking anything but nice to have (priority)Not breaking anything but nice to have (priority)
Description
Clear and concise description of the problem
Currently process.env.NODE_ENV
gets replaced by its actual value when vitest
is run in browser mode.
This behaviour defeats some parts of component testing, when we want to actually test the behaviour of our component in different environments. Eg: by throwing in development vs warning in production.
Suggested solution
Allow process.env
to be dynamic in browser mode
Alternative
No response
Additional context
If you need a quick testing example 🙃
https://github.com/JCQuintas/vitest-browser-process-env
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
danilofuchs and MMLudo
Metadata
Metadata
Assignees
Labels
feat: browserIssues and PRs related to the browser runnerIssues and PRs related to the browser runnerp2-nice-to-haveNot breaking anything but nice to have (priority)Not breaking anything but nice to have (priority)
Type
Projects
Status
Approved