fix: 내부 전용 예약 명령 실행 경계를 분리한다
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user