stuff
This commit is contained in:
@@ -37,7 +37,7 @@ describe('isPollingBot', () => {
|
||||
|
||||
describe('waitForPollResponse + getPendingPollChallenge', () => {
|
||||
it('stores challenge and makes it retrievable', () => {
|
||||
waitForPollResponse('f1', 'b1', mockChallenge, 1, mockOpponent, 'arena1', null)
|
||||
void waitForPollResponse('f1', 'b1', mockChallenge, 1, mockOpponent, 'arena1', null)
|
||||
|
||||
const pending = getPendingPollChallenge('b1')
|
||||
expect(pending).not.toBeNull()
|
||||
@@ -73,7 +73,7 @@ describe('submitPollResponse', () => {
|
||||
})
|
||||
|
||||
it('rejects duplicate submission (second submit returns false)', async () => {
|
||||
waitForPollResponse('f3', 'b3', mockChallenge, 1, mockOpponent, 'arena1', null)
|
||||
void waitForPollResponse('f3', 'b3', mockChallenge, 1, mockOpponent, 'arena1', null)
|
||||
|
||||
expect(submitPollResponse('b3', 'first')).toBe(true)
|
||||
expect(submitPollResponse('b3', 'second')).toBe(false)
|
||||
@@ -103,7 +103,7 @@ describe('timeout', () => {
|
||||
it('clears pending after timeout', async () => {
|
||||
vi.useFakeTimers()
|
||||
const shortChallenge = { ...mockChallenge, timeout_ms: 100 }
|
||||
waitForPollResponse('f6', 'b6', shortChallenge, 1, mockOpponent, 'arena1', null)
|
||||
void waitForPollResponse('f6', 'b6', shortChallenge, 1, mockOpponent, 'arena1', null)
|
||||
|
||||
vi.advanceTimersByTime(10_200)
|
||||
expect(getPendingPollChallenge('b6')).toBeNull()
|
||||
|
||||
Reference in New Issue
Block a user