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(headless): fix unit tests by changing to vitest #4449

Merged
merged 11 commits into from
Sep 24, 2024

Conversation

alexprudhomme
Copy link
Contributor

@alexprudhomme alexprudhomme commented Sep 20, 2024

To be merged into #4442

Unit tests were failing because Jest has a hard time with ESM modules. I tried to make it work but it ended up being easier to switch to vitest altogether. The api are really really similar, it should not change how we write tests.

Headless-react unit tests are still failing it is addressed here - > #4452

Copy link

github-actions bot commented Sep 20, 2024

Pull Request Report

PR Title

✅ Title follows the conventional commit spec.

Live demo links

Bundle Size

File Old (kb) New (kb) Change (%)
case-assist 239.2 239.2 0
commerce 338.1 338.1 0
search 407.7 407.7 0
insight 392.7 392.7 0
recommendation 250.1 250.1 0
ssr 401.7 401.7 0
ssr-commerce 350.3 350.3 0

SSR Progress

Use case SSR (#) CSR (#) Progress (%)
search 39 44 89
recommendation 0 4 0
case-assist 0 6 0
insight 0 27 0
commerce 0 15 0
Detailed logs search : buildInteractiveResult
search : buildInteractiveInstantResult
search : buildInteractiveRecentResult
search : buildInteractiveCitation
search : buildGeneratedAnswer
recommendation : missing SSR support
case-assist : missing SSR support
insight : missing SSR support
commerce : missing SSR support

@alexprudhomme alexprudhomme changed the title from jest to vitest test(headless): fix unit tests by changing to vitest Sep 23, 2024
@alexprudhomme alexprudhomme marked this pull request as ready for review September 23, 2024 14:35
@alexprudhomme alexprudhomme requested review from a team as code owners September 23, 2024 14:35
@alexprudhomme alexprudhomme requested review from olamothe, y-lakhdar and fbeaudoincoveo and removed request for a team September 23, 2024 14:35
@louis-bompart louis-bompart added this to the V3 GA milestone Sep 23, 2024
Copy link
Collaborator

@louis-bompart louis-bompart left a comment

Choose a reason for hiding this comment

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

Provisional LGTM, assuming all tests turn green with #4442 in there.

@alexprudhomme alexprudhomme merged commit 7cacd90 into type=module-headless-types Sep 24, 2024
2 checks passed
@alexprudhomme alexprudhomme deleted the type=module-vitest branch September 24, 2024 12: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