Skip to content

Commit

Permalink
change test mock to make it easier to understand
Browse files Browse the repository at this point in the history
  • Loading branch information
craigzour committed Nov 5, 2024
1 parent 8adcc0e commit 5dbcad7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/lib/rateLimiting/tokenBucketLimiter.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ describe("tokenBucketLimiter", () => {
getTokenBucketRateLimiterAssociatedToFormMock.mockResolvedValueOnce({
points: 10,
consume: vi.fn().mockRejectedValueOnce({
remainingPoints: 5,
remainingPoints: 0,
msBeforeNext: 2000,
consumedPoints: 5,
consumedPoints: 10,
}),
// biome-ignore lint/suspicious/noExplicitAny: <explanation>
} as any);
Expand All @@ -61,7 +61,7 @@ describe("tokenBucketLimiter", () => {
bucketStatus: {
bucketCapacity: 10,
numberOfMillisecondsBeforeRefill: 2000,
remainingTokens: 5,
remainingTokens: 0,
},
});
});
Expand Down

0 comments on commit 5dbcad7

Please sign in to comment.