feat: prepare six-lesson trial backend with reliable rewards and operations
Backend CI / type-check, build, tests (push) Successful in 1m0s
Backend CI / type-check, build, tests (push) Successful in 1m0s
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
import assert from 'node:assert/strict'
|
||||
import { assertAuthRateLimit } from '../src/common/rate-limit/auth-rate-limit'
|
||||
|
||||
let threw = false
|
||||
for (let i = 0; i < 35; i++) {
|
||||
try {
|
||||
assertAuthRateLimit('test-client-429')
|
||||
} catch (error) {
|
||||
threw = true
|
||||
assert.equal((error as { status?: number }).status, 429)
|
||||
break
|
||||
}
|
||||
}
|
||||
assert.equal(threw, true, 'expected rate limit after repeated auth attempts')
|
||||
|
||||
console.log('auth-rate-limit tests passed')
|
||||
Reference in New Issue
Block a user