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: migrate to vitest #1708

Merged
merged 3 commits into from
Jan 2, 2024
Merged

Conversation

marcalexiei
Copy link
Contributor

@marcalexiei marcalexiei commented Jan 2, 2024

Followup of #1707.

All tests now run with vitest.

TransWithoutContext file have been renamed with jsx extension otherwise vitest is not able to compile it correctly.
Regular build should not be affect by this change.

TransWithoutContext now use React functions to create JSX.Element

Checklist

  • only relevant code is changed (make a diff before you submit the PR)
  • run tests npm run test
  • tests are included
  • commit message and code follows the Developer's Certification of Origin

@marcalexiei marcalexiei force-pushed the feature/vitest-runtime branch from 6bd3eb5 to 78fc35e Compare January 2, 2024 10:49
@coveralls
Copy link

coveralls commented Jan 2, 2024

Coverage Status

coverage: 96.984% (+0.8%) from 96.23%
when pulling ad602d7 on marcalexiei:feature/vitest-runtime
into a23773d on i18next:master.

Copy link

New and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Packages Version New capabilities Transitives Size Publisher
happy-dom 12.10.3 network, filesystem, shell +3 6.92 MB davidortner
@vitest/coverage-v8 1.1.1 None +5 7.59 MB oreanno

🚮 Removed packages: [email protected], [email protected]

@marcalexiei
Copy link
Contributor Author

I'm confused by code climate check:
all the reported issues were already present in the file so why the check fails now? 😑

Do I need to implement the provided suggestions?

@adrai
Copy link
Member

adrai commented Jan 2, 2024

I'm confused by code climate check: all the reported issues were already present in the file so why the check fails now? 😑

Do I need to implement the provided suggestions?

no, these issues are there because of the filename change... you can ignore them

@adrai
Copy link
Member

adrai commented Jan 2, 2024

Do you see the same errors locally?

@marcalexiei marcalexiei force-pushed the feature/vitest-runtime branch from b33112f to f95d717 Compare January 2, 2024 11:45
@marcalexiei
Copy link
Contributor Author

Do you see the same errors locally?

No, on my machine works fine:

image

@adrai
Copy link
Member

adrai commented Jan 2, 2024

I suspect there's a caching issue on circleci... can you update the package.json i.e. by updating the i18next dependency?
image

@adrai
Copy link
Member

adrai commented Jan 2, 2024

looks good now

@adrai adrai merged commit 63ad0a9 into i18next:master Jan 2, 2024
@marcalexiei
Copy link
Contributor Author

Yeah! Nice catch!

@marcalexiei marcalexiei deleted the feature/vitest-runtime branch January 2, 2024 11:58
@adrai
Copy link
Member

adrai commented Jan 2, 2024

@adrai
Copy link
Member

adrai commented Jan 2, 2024

ok, the coverage part seems to be the problem, like described here: vitest-dev/vitest#317

@marcalexiei
Copy link
Contributor Author

I’ll take a look later (having dinner)

@marcalexiei
Copy link
Contributor Author

Great! Thank you for looking into this 🎉

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.

3 participants