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

chore: migrate to vitest #181

Merged
merged 63 commits into from
Jan 23, 2024
Merged

chore: migrate to vitest #181

merged 63 commits into from
Jan 23, 2024

Conversation

cgdibble
Copy link
Contributor

@cgdibble cgdibble commented Dec 29, 2023

This does a lot.

  • sets up for use of vitest in the repo
  • remove Kraken testing libs, mocha, jest, and karma
  • adopts idiomatic vitest patterns of mocking and assertions
  • removes cases of test-aware implementations (some still linger on, I addressed as I ran in to them with fixing tests)
  • removes logger tests that really test beaver logger internals
  • removes more complicated mock script util that had it's own test suite
  • merge script and scriptUtils tests since those were all tests of script.js
  • uses vitests coverage as well. Dumps all coverage in to a single coverage dir since it's no longer split between test runners. Merges coverage uploading to a single GH Action step, too.
  • removes old test tool files and references from package.json scripts
  • co-locates test files with implementation and ditches the ./test dir entirely

This spawned from a need to test recent fraudnet changes. So be mindful that this base branch is to our fraudnet feature branch, and that we still need to add tests for fraudnet so that is still pending.

Note: Initially done here in #117 but that was using a feature branch as the base branch. This just moves the same changes to PR against main.

src/session.test.js Outdated Show resolved Hide resolved
Copy link

codecov bot commented Jan 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (0678191) 81.83% compared to head (649ea90) 72.89%.
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #181      +/-   ##
==========================================
- Coverage   81.83%   72.89%   -8.94%     
==========================================
  Files          21       22       +1     
  Lines         534     1797    +1263     
  Branches       40      217     +177     
==========================================
+ Hits          437     1310     +873     
- Misses         97      477     +380     
- Partials        0       10      +10     
Flag Coverage Δ
client ?
server ?

Flags with carried forward coverage won't be shown. Click here to find out more.

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

Copy link
Contributor

@jshawl jshawl left a comment

Choose a reason for hiding this comment

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

Nice work! :shipit:

src/session.js Show resolved Hide resolved
src/domains.js Outdated Show resolved Hide resolved
@cgdibble cgdibble merged commit 3797fde into main Jan 23, 2024
5 checks passed
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.

6 participants