test(im,im-session-commands): fix typecheck errors in new test cases

This commit is contained in:
MicroBlock committed 2026-11-18 02:55:59 +08:00
1 parent 2e61a42d73
commit b3568da86b
2 files changed
+2 -2

No files matched your search

@@ -614,8 +614,8 @@ describe('lifecycle', () => {
it('rolls back the pending receipt when passthrough execute() returns undefined so retries pass through', async () => {
const harness = await bootCommands({
commands: { passthrough: ['compact'] },
dshCommands: [{ name: 'compact', description: 'Compact context' }],
})
harness.ctx.commands.register({ name: 'compact', description: 'Compact context', handler: () => ({ kind: 'success' }) })
await ensureShared(harness)
// Simulate a command disappearing between `list(agent)` and `execute(...)`.
vi.spyOn(harness.base.ctx.commands, 'execute').mockResolvedValue(undefined)
@@ -1046,7 +1046,7 @@ describe('stored delivery validation', () => {
expect(replaced1).toBe(initial.sessionId)
expect(replaced2).toBeDefined()
expect(replaced2).not.toBe(replaced1)
const finalRecord = harness.host.resolve(initial.key)
const finalRecord = harness.host.get(initial.key)
expect(finalRecord?.generation).toBe(2)
expect(finalRecord?.sessionId).not.toBe(replaced2)
})