test: cover the readAttachment and hostDescription bench stubs directly

This commit is contained in:
creatixchu
2026-07-29 14:45:46 +08:00
parent 666fd721b5
commit 7e68cf8986

View File

@@ -467,9 +467,12 @@ describe('fixture session face', () => {
await runtime.sessions.add({ id: 's1' })
const bare = runtime.sessions.behavior('s1')
expect(() => bare.prompt()).toThrow(/prompt is not stubbed/)
expect(() => bare.readAttachment('att-1' as Parameters<typeof bare.readAttachment>[0])).toThrow(/readAttachment is not stubbed/)
expect(() => bare.cancel()).toThrow(/cancel is not stubbed/)
expect(() => bare.command()).toThrow(/command is not stubbed/)
expect(() => bare.loadOlder()).toThrow(/loadOlder is not stubbed/)
// No host handshake exists in the bench unless a fixture supplies one.
expect(runtime.sessions.hostDescription()).toBeUndefined()
await runtime.dispose()
})