| 1 | import { describe, expect, it } from 'vitest'; |
| 2 | |
| 3 | import { rateLimitPerMinute, rateLimitTracker |
| 4 | |
| 5 | describe('rate limit', () |
| 6 | const anonymous = |
| 7 | const signedIn = |
| 8 | |
| 9 | it('counts a signed-in caller per account, with the API key budget', |
| 10 | expect(rateLimitTracker(signedIn |
| 11 | expect(rateLimitPerMinute(signedIn |
| 12 | }); |
| 13 | |
| 14 | it('counts an anonymous caller per address, with less', |
| 15 | expect(rateLimitTracker(anonymous |
| 16 | expect(rateLimitPerMinute(anonymous |
| 17 | }); |
| 18 | }); |