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

fix: support vitest #2625

Merged
merged 2 commits into from
Dec 8, 2024
Merged

fix: support vitest #2625

merged 2 commits into from
Dec 8, 2024

Conversation

talkor
Copy link
Member

@talkor talkor commented Dec 4, 2024

No description provided.

@talkor talkor requested a review from a team as a code owner December 4, 2024 14:42
Copy link
Contributor

github-actions bot commented Dec 4, 2024

A new prerelease version of this PR has been published! 🎉
To install this prerelease version, run the following command in your terminal with any one of the packages changed in this PR:

To update @vibe/core:

yarn add @vibe/core@3.2.1-alpha-c7209.0

Or with npm:

npm i @vibe/core@3.2.1-alpha-c7209.0

Copy link
Contributor

@YossiSaadi YossiSaadi left a comment

Choose a reason for hiding this comment

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

isn't process.env.NODE_ENV === "test" also in vitest?

@talkor
Copy link
Member Author

talkor commented Dec 4, 2024

isn't process.env.NODE_ENV === "test" also in vitest?

Yes but vitest can't handle require

@YossiSaadi
Copy link
Contributor

isn't process.env.NODE_ENV === "test" also in vitest?

Yes but vitest can't handle require

so maybe worth leaving the NODE_ENV one as well

@YossiSaadi
Copy link
Contributor

btw its really weird that this code should lay in the component itself, is it really a must in order to do lazy load?

@talkor
Copy link
Member Author

talkor commented Dec 4, 2024

isn't process.env.NODE_ENV === "test" also in vitest?

Yes but vitest can't handle require

so maybe worth leaving the NODE_ENV one as well

why? It was for jest because jest isn't very good with esm while vitest is quite the opposite. This check covers both
Plus the NODE_ENV is not guaranteed

@talkor
Copy link
Member Author

talkor commented Dec 4, 2024

btw its really weird that this code should lay in the component itself, is it really a must in order to do lazy load?

unfortunately yes, do you have other idea?

Copy link
Contributor

github-actions bot commented Dec 5, 2024

A new prerelease version of this PR has been published! 🎉
To install this prerelease version, run the following command in your terminal with any one of the packages changed in this PR:

To update @vibe/core:

yarn add @vibe/core@3.2.1-alpha-fb25f.0

Or with npm:

npm i @vibe/core@3.2.1-alpha-fb25f.0

@talkor talkor changed the title fix: support vitest [prerelease] fix: support vitest Dec 8, 2024
@talkor talkor merged commit 638b19f into master Dec 8, 2024
11 checks passed
@talkor talkor deleted the test/vitest-support branch December 8, 2024 07:40
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