fix(game-api): separate engine message responses

This commit is contained in:
2026-09-03 17:57:17 +00:00
parent 1cb66f76fb
commit 03e47feef1
2 changed files with 58 additions and 23 deletions
+5 -1
View File
@@ -801,8 +801,11 @@ describe('messages router missing-flow compatibility', () => {
action,
reason: 'success',
}));
const transaction = vi.fn(async () => {
throw new Error('ENGINE message response must not enter the API input-event transaction.');
});
const { caller } = buildContext(
{ $queryRaw: vi.fn(async () => [messageRow]) },
{ $queryRaw: vi.fn(async () => [messageRow]), $transaction: transaction },
{ turnDaemon: { requestCommand } }
);
@@ -822,6 +825,7 @@ describe('messages router missing-flow compatibility', () => {
response: true,
})
);
expect(transaction).not.toHaveBeenCalled();
}
);