Repository navigation
fix(test): make tests pass with latest Deno and sinon 22 - #470
Conversation
sinon 22 restores sandbox fakes in a different order, so the properties added by `sandbox.define()` were removed before the stubs on them were restored, breaking `stubMessage()` and cascading failures in subsequent steps. Use a separate sandbox for `define()` and restore it last. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to The timeout assertion accommodates differences in error messages across supported Deno versions. No merge-blocking issue is identified. Pre-merge checks |
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #470 +/- ##
==========================================
+ Coverage 96.05% 96.19% +0.14%
==========================================
Files 29 29
Lines 1421 1421
Branches 191 190 -1
==========================================
+ Hits 1365 1367 +2
+ Misses 43 41 -2
Partials 13 13 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
…er_test
The message of the `AbortSignal.timeout()` error changed in recent Deno
("Signal timed out" -> "The operation was aborted due to timeout").
Check that a `DOMException` named `TimeoutError` is thrown instead, so
the test passes regardless of the Deno version.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The only remaining failure, All tests passed in the All other jobs passed. Could someone with write access re-run the failed job? Thanks! |
|
Thank you. I will test it on the local. |
Shougo
left a comment
There was a problem hiding this comment.
I have tested on the local.
LGTM.
|
Merged. Thank you! |
Summary
Fixes two test failures that block #469 (and the
2.xjobs onmain).1.
worker_test.tsfails with sinon 22#469 bumps
sinonfrom^21.0.0to^22.1.0, andTestfails on all platforms:stubMessage()addedpostMessage/onmessagewithsandbox.define()and then stubbed them withsandbox.stub()in the same sandbox. sinon 22 restores sandbox fakes in a different order, so the defined properties were removed before the stubs on them were restored. The firstrestore()throws, the properties are left behind, and every following step fails ondefine().→ Use a separate sandbox for
define()and restore it after the stub sandbox.2.
shared_server_test.tsfails with the latest Deno 2.xThe message of the
AbortSignal.timeout()error changed in recent Deno. #469 replaces the expected string with the new one, but that would break the2.3.0job instead.→ Check that a
DOMExceptionnamedTimeoutErroris thrown, which is defined by the web standard and does not depend on the Deno version.Test plan
worker_test.tswithsinon@^21.0.0(current):ok | 4 passed (184 steps)worker_test.tswithsinon@^22.1.0(as in Update deps #469):ok | 4 passed (184 steps)shared_server_test.tswith Deno 2.9.7: passeddeno fmt --check/deno lint/deno check2.3.0job)🤖 Generated with Claude Code
Summary by CodeRabbit