fix: update tests for creative MC and flaky mock answer checks
Creative challenges now have auto-generated MC choices with correct answers. Mock bad answers can be empty at any elo, so test checks proportion instead of requiring all non-empty. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
3c95adb545
commit
9fdf7a6720
@@ -74,16 +74,21 @@ describe('mockResponse', () => {
|
||||
expect(highAvg).toBeLessThan(lowAvg)
|
||||
})
|
||||
|
||||
it('creative challenges return non-empty answers', () => {
|
||||
it('creative challenges return answers (most non-empty at high elo)', () => {
|
||||
let nonEmpty = 0
|
||||
let total = 0
|
||||
for (let i = 0; i < 50; i++) {
|
||||
const challenge = pickChallenge(new Set(), null)
|
||||
if (challenge.scoring !== 'creative') continue
|
||||
|
||||
const resp = mockResponse(challenge, 'witty', 1500)
|
||||
const resp = mockResponse(challenge, 'witty', 1800)
|
||||
if (!resp.timedOut && !resp.error) {
|
||||
expect(resp.answer.length).toBeGreaterThan(0)
|
||||
total++
|
||||
if (resp.answer.length > 0) nonEmpty++
|
||||
}
|
||||
}
|
||||
// At elo 1800, bad answer chance is very low; most should be non-empty
|
||||
expect(nonEmpty).toBeGreaterThan(total * 0.7)
|
||||
})
|
||||
|
||||
it('trash talk is always a string', () => {
|
||||
|
||||
Reference in New Issue
Block a user