Skip to content

Removed sinon in favor of equivalent vitest functionality#758

Merged
troyciesco merged 1 commit intomainfrom
rm-sinon
Mar 30, 2026
Merged

Removed sinon in favor of equivalent vitest functionality#758
troyciesco merged 1 commit intomainfrom
rm-sinon

Conversation

@troyciesco
Copy link
Copy Markdown
Contributor

no ref

  • only tests, no user impact
  • replaces sinon with the equivalent functionality from vitest
  • removes sinon from dependencies

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 30, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: d3fed0a5-9d98-4ba5-80c0-181b330ccc5b

📥 Commits

Reviewing files that changed from the base of the PR and between 5b8e1ed and 7915b80.

⛔ Files ignored due to path filters (1)
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (4)
  • package.json
  • test/coverage-gaps.test.js
  • test/general.test.js
  • test/read-zip.test.js
💤 Files with no reviewable changes (2)
  • package.json
  • test/read-zip.test.js
✅ Files skipped from review due to trivial changes (1)
  • test/general.test.js

Walkthrough

This pull request removes the sinon dev dependency from package.json and migrates tests in three files to Vitest's vi utilities. In test/coverage-gaps.test.js sinon.spy() usages were replaced with vi.fn() and call-count assertions changed to toHaveBeenCalledTimes(). In test/general.test.js sinon.stub()/sinon.spy() were replaced with vi.spyOn(...).mockReturnValue() and vi.spyOn() respectively, and restore() calls became mockRestore(). In test/read-zip.test.js sandbox creation/teardown and the sinon import were removed. Core test logic and exercised flows remain unchanged.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: removing the sinon testing library and replacing it with vitest functionality across the test files and dependencies.
Description check ✅ Passed The description clearly relates to the changeset, explaining that only tests were modified, sinon was replaced with vitest equivalents, and sinon was removed from dependencies.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch rm-sinon

Warning

Review ran into problems

🔥 Problems

Git: Failed to clone repository. Please run the @coderabbitai full review command to re-trigger a full review. If the issue persists, set path_filters to include or exclude specific files.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

}

describe('Zip file handler can read zip files', function () {
let sandbox;
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

this sandbox wasn't actually doing anything i don't think

@troyciesco troyciesco merged commit cef24d0 into main Mar 30, 2026
4 checks passed
@troyciesco troyciesco deleted the rm-sinon branch March 30, 2026 20:40
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.

1 participant