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

Migrate from mocha + nyc to jest #248

Merged
merged 3 commits into from
Jan 18, 2024
Merged

Migrate from mocha + nyc to jest #248

merged 3 commits into from
Jan 18, 2024

Conversation

blitz-1306
Copy link
Contributor

@blitz-1306 blitz-1306 commented Jan 17, 2024

Preface

Some time ago I noticed that updating dependencies causing unexpected coverage drops. While digging, I discovered that it was happening after updating TypeScript to latest and caused by nyc not being updated for a while. As nyc does not seem to be maintained for a while, I decided to create PR to move out tests to jest.

Note

Benefits:

  • Supports parallel test executon.
  • Supports coverage (based on same logic as nyc, but only limited and supported subset).
  • Supports tests filtering and.
  • Clear docs: configuration, CLI options.

Changes

  • Removed mocha and nyc dependencies alongside with related config files.
  • Introduced jest and adapted test suites.
  • Updated TypeScript to latest (with some other development dependencies).

Warning

Files in src/bin are no longer covered. Same happends with other coverage engines, like c8.

Regards.

…s. Introduced jest and adapted tests. Updated typescript to latest (with some other development dependencies).
@blitz-1306 blitz-1306 added debt Technical debt dependencies Pull requests that update a dependency file labels Jan 17, 2024
@blitz-1306 blitz-1306 requested a review from cd1m0 January 17, 2024 05:39
@codecov-commenter
Copy link

codecov-commenter commented Jan 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (36ee1b0) 91.60% compared to head (5496a0e) 91.10%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #248      +/-   ##
==========================================
- Coverage   91.60%   91.10%   -0.51%     
==========================================
  Files         270      269       -1     
  Lines        6634     6461     -173     
  Branches     1350     1308      -42     
==========================================
- Hits         6077     5886     -191     
- Misses        291      468     +177     
+ Partials      266      107     -159     

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

@blitz-1306 blitz-1306 mentioned this pull request Jan 18, 2024
2 tasks
@cd1m0 cd1m0 merged commit b7c0527 into master Jan 18, 2024
3 checks passed
@cd1m0 cd1m0 deleted the migrate-to-jest branch January 18, 2024 07:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
debt Technical debt dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants