fix: 내부 전용 예약 명령 실행 경계를 분리한다

This commit is contained in:
2026-08-24 16:02:35 +00:00
parent b5763290d2
commit 9fe1f1878a
11 changed files with 169 additions and 63 deletions
+18 -1
View File
@@ -1227,7 +1227,12 @@ describe('appRouter', () => {
const generalWrites: unknown[] = [];
const nationWrites: unknown[] = [];
const caller = appRouter.createCaller(
buildContext({ general, generalTurnWrites: generalWrites, nationTurnWrites: nationWrites })
buildContext({
state: buildWorldState(),
general,
generalTurnWrites: generalWrites,
nationTurnWrites: nationWrites,
})
);
await expect(
@@ -1248,6 +1253,18 @@ describe('appRouter', () => {
expectedRevision: 0,
})
).rejects.toMatchObject({ code: 'BAD_REQUEST' });
await expect(
caller.turns.reserved.setGeneral({
generalId: 14,
turnIndex: 0,
action: 'che_NPC능동',
args: {},
expectedRevision: 0,
})
).rejects.toMatchObject({
code: 'BAD_REQUEST',
message: 'Unknown general turn command: che_NPC능동',
});
expect(generalWrites).toHaveLength(0);
expect(nationWrites).toHaveLength(0);