-
Notifications
You must be signed in to change notification settings - Fork 1.3k
[vitest-pool-workers] fix: reset() now clears ratelimit binding state between tests #14409
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
base: main
Are you sure you want to change the base?
Changes from all commits
6b3aeff
633e556
681bd41
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| --- | ||
| "@cloudflare/vitest-pool-workers": patch | ||
| "miniflare": patch | ||
| --- | ||
|
|
||
| `reset()` from `cloudflare:test` now resets ratelimit binding state between tests. Previously, `RATE_LIMITERS` bindings retained their in-memory bucket counts across test boundaries, causing later tests in the same file to see stale rate-limit exhaustion state. | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,6 +5,7 @@ interface __BaseEnv_Env { | |
| R2_BUCKET: R2Bucket; | ||
| DATABASE: D1Database; | ||
| COUNTER: DurableObjectNamespace<import("./index").Counter>; | ||
| RATE_LIMITER: RateLimit; | ||
|
Comment on lines
5
to
+8
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🚩 Generated env.d.ts appears manually edited rather than regenerated The (Refers to lines 2-8) Was this helpful? React with 👍 or 👎 to provide feedback. |
||
| } | ||
| declare namespace Cloudflare { | ||
| interface GlobalProps { | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.