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: replace Jest with Vitest #317

Merged
merged 9 commits into from
Jan 20, 2025
Merged

test: replace Jest with Vitest #317

merged 9 commits into from
Jan 20, 2025

Conversation

targos
Copy link
Member

@targos targos commented Apr 21, 2023

Highlights:

  • Update all dependencies.
  • Use Vitest instead of Jest and adapt config.
  • Make the default package type "module".
    • A CommonJS build is still done, but is now the secondary one.
  • Update tsconfig to be more modern and ESM-first.
  • Avoid circular dependencies by importing from deeper than src/index.ts internally.
  • Use ts-pattern instead of switch statements.

@targos targos marked this pull request as ready for review January 16, 2025 14:05
Copy link

codecov bot commented Jan 16, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.48%. Comparing base (928b6e7) to head (e705f83).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #317      +/-   ##
==========================================
- Coverage   98.59%   98.48%   -0.12%     
==========================================
  Files         245      243       -2     
  Lines        6280    10016    +3736     
  Branches     1327     2144     +817     
==========================================
+ Hits         6192     9864    +3672     
- Misses         85      152      +67     
+ Partials        3        0       -3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@targos targos requested a review from stropitek January 16, 2025 15:41
Copy link
Contributor

@stropitek stropitek left a comment

Choose a reason for hiding this comment

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

CleanShot 2025-01-17 at 14 00 25@2x

Some directories and files are now part of the coverage but shouldn't. Maybe some stuff in demo / scripts that should be moved to src? Otherwise LGTM.

@targos
Copy link
Member Author

targos commented Jan 20, 2025

I'll wait for #480 to avoid conflicts in it.

@targos targos added the blocked label Jan 20, 2025
@targos targos marked this pull request as draft January 20, 2025 08:08
@targos targos removed the blocked label Jan 20, 2025
@targos targos marked this pull request as ready for review January 20, 2025 08:32
@targos targos merged commit 3a8833a into main Jan 20, 2025
10 of 11 checks passed
@targos targos deleted the vitest branch January 20, 2025 08:35
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