Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Co-authored-by: Orca <help@stably.ai> Co-authored-by: gsxdsm <gsxdsm@users.noreply.github.com>
19 lines
610 B
TypeScript
19 lines
610 B
TypeScript
import { describe, expect, it } from 'vitest'
|
|
import {
|
|
buildNativeChatSubscriptionId,
|
|
buildNativeChatUnsubscribe
|
|
} from './native-chat-stream-unsubscribe'
|
|
|
|
describe('native-chat stream unsubscribe key builder', () => {
|
|
it('derives the cleanup token as agent:sessionId', () => {
|
|
expect(buildNativeChatSubscriptionId('claude', 'sess-1')).toBe('claude:sess-1')
|
|
})
|
|
|
|
it('builds the unsubscribe RPC frame mobile and web share', () => {
|
|
expect(buildNativeChatUnsubscribe('codex', 'abc')).toEqual({
|
|
method: 'nativeChat.unsubscribe',
|
|
params: { subscriptionId: 'codex:abc' }
|
|
})
|
|
})
|
|
})
|