정답인식 기본값: 띄어쓰기 무시(숫자·특수문자는 그대로 켬, 대소문자는 늘 무시). 기본값 회귀 테스트, docs 04·12·13
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -40,7 +40,7 @@ const LETTER: Record<string, string> = {
|
||||
const isLatinText = (t: string) => /[A-Za-z]/.test(t) && !/[\p{Script=Hangul}\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Han}]/u.test(t);
|
||||
const MAX_READINGS = 4;
|
||||
|
||||
/** Spacing counts in the default answer check: each spelling also without its spaces (로드 스튜어트 / 로드스튜어트). */
|
||||
/** Each spelling also without its spaces (로드 스튜어트 / 로드스튜어트), for rooms that turn 띄어쓰기 on in 정답인식. */
|
||||
const withJoined = (list: string[]) => [...new Set(list.flatMap((r) => (/\s/.test(r) ? [r, r.replace(/\s+/g, '')] : [r])))];
|
||||
|
||||
/**
|
||||
|
||||
@@ -91,7 +91,7 @@ describe('rooms over WebSocket', () => {
|
||||
const { a, cb, code } = await setup();
|
||||
const r = await nextRoom(cb, (x) => x.players.length === 2);
|
||||
expect(r.hostId).toBe(a.id);
|
||||
expect(r.config).toMatchObject({ title: '방장님의 방', level: 3, answer: 'title', strict: { space: true, number: true, symbol: true }, hint: 'none', count: 30 });
|
||||
expect(r.config).toMatchObject({ title: '방장님의 방', level: 3, answer: 'title', strict: { space: false, number: true, symbol: true }, hint: 'none', count: 30 });
|
||||
expect((await api(s.base, '/api/rooms')).body.rooms.map((x: any) => x.code)).toEqual([code]);
|
||||
expect((await api(s.base, `/api/rooms/${code}`)).body).toMatchObject({ code, players: 2, status: 'lobby' });
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user