Files
core2026/app/game-frontend/test/autorunUser.test.ts
T
Hide_D 9e5e580134 feat: 메인에 자율행동 설정을 표시한다
Ref와 Gateway의 옵션 순서와 유효 기간 문구를 따라 8열 마지막 셀에 상태를 더한다.\n활성 상태의 hover와 keyboard focus에서 상세 tooltip을 보이고, 비활성 상태는 표준으로 표시한다.
2026-08-27 16:37:47 +00:00

19 lines
858 B
TypeScript

import assert from 'node:assert/strict';
import test from 'node:test';
import { formatAutorunUserDetail } from '../src/utils/autorunUser.ts';
void test('uses the Ref and Gateway autorun option order and lets recruit_high replace recruit', () => {
assert.equal(
formatAutorunUserDetail({
limitMinutes: 1_440,
options: ['chief', 'recruit', 'battle', 'train', 'recruit_high', 'warp', 'develop'],
}),
'내정, 순간이동, 모병, 훈련/사기진작, 출병, 사령턴, 24시간 유효'
);
});
void test('formats minute and always-valid autorun limits like Ref', () => {
assert.equal(formatAutorunUserDetail({ limitMinutes: 90, options: ['recruit'] }), '징병, 90분 유효');
assert.equal(formatAutorunUserDetail({ limitMinutes: 43_200, options: ['develop'] }), '내정, 항상 유효');
});