이지선다: 퀴즈를 아직 안 고른 방이 서버 노래 DB 곡 수(906곡·30문제)를 보이던 것 — 이지선다는 퀴즈 곡만 세어 0곡으로 보임
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -69,7 +69,9 @@ test('quiz kinds: picking an 이지선다 퀴즈 makes the room 이지선다; an
|
||||
const { cls } = await room(sa, []);
|
||||
const host = cls[0]!;
|
||||
host.send({ t: 'config', patch: { mode: 'duel' } });
|
||||
await host.waitFor((m) => m.t === 'room' && m.room.config.mode === 'duel');
|
||||
const none = (await host.waitFor((m) => m.t === 'room' && m.room.config.mode === 'duel')) as Msg<'room'>;
|
||||
// no 이지선다 퀴즈 yet: no songs (not the server DB pool)
|
||||
expect(none.room.pool).toEqual({ playable: 0, total: 0 });
|
||||
host.send({ t: 'start' });
|
||||
await host.waitFor((m) => m.t === 'error' && m.message.includes('이지선다 퀴즈를 골라'));
|
||||
host.send({ t: 'config', patch: { quizId: duelId } });
|
||||
|
||||
@@ -71,7 +71,8 @@ export class Room {
|
||||
.query<{ n: number }, [number, number]>('SELECT COUNT(*) n FROM custom_quiz_items WHERE quiz_id = ? AND (? = 0 OR views IS NOT NULL)')
|
||||
.get(this.config.quizId, this.config.mode === 'duel' ? 1 : 0)!.n;
|
||||
this.pool = { playable: n, total: n };
|
||||
} else this.pool = countPool(this.deps.db, this.config);
|
||||
} else if (this.config.mode === 'duel') this.pool = { playable: 0, total: 0 }; // 이지선다 plays only an 이지선다 퀴즈
|
||||
else this.pool = countPool(this.deps.db, this.config);
|
||||
}
|
||||
|
||||
/** A question's song: a DB song, or an item of the room's 제작된 퀴즈. */
|
||||
|
||||
Reference in New Issue
Block a user