fix: update tests for sinon v21 error stringification#5731
Merged
mark-wiemer merged 4 commits intorenovate/sinon-21.xfrom Feb 19, 2026
Merged
fix: update tests for sinon v21 error stringification#5731mark-wiemer merged 4 commits intorenovate/sinon-21.xfrom
mark-wiemer merged 4 commits intorenovate/sinon-21.xfrom
Conversation
1 task
|
Fixed two test failures caused by changes in sinon v21's error handling. In sinon v21, errors thrown by stubs now have different stringification behavior. Updated tests to create Error objects with custom toString() methods to match expected error message format. Co-authored-by: mark-wiemer <7833360+mark-wiemer@users.noreply.github.com>
Co-authored-by: mark-wiemer <7833360+mark-wiemer@users.noreply.github.com>
Contributor
Author
|
Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
Copilot
AI
changed the title
[WIP] Update dependency sinon to version 21.0.1
fix: update tests for sinon v21 error stringification
Feb 16, 2026
Member
|
Manually triggered test run: https://github.com/mochajs/mocha/actions/runs/22081335508 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## renovate/sinon-21.x #5731 +/- ##
====================================================
Coverage 88.85% 88.85%
====================================================
Files 66 66
Lines 4774 4774
Branches 976 976
====================================================
Hits 4242 4242
Misses 532 532 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
6feb9ef to
0f17221
Compare
Member
|
Lint failed because Copilot wrongly removed a directive: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Sinon v21 changed how
.throws()stringifies errors. Previouslystub.throws("message")produced errors that stringified to just"message". Now they stringify as"Error: Sinon-provided message".Changes
toString()to match expected formattoString()to match expected formatExample
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.