mirror of
https://github.com/deepseek-ai/deepseek-harness.git
synced 2026-10-26 16:55:08 +00:00
The protocol package leaves the repository-wide coverage exemption and meets the same per-file 100% gate as the other packages. The new specs cover the identity mock, the wire helpers and every additive-field parser branch, both public entry points, and the carrier's forwarded-route paths; the key parser drops an unreachable guard so its remaining branches are exercised.
22 lines
1.2 KiB
TypeScript
22 lines
1.2 KiB
TypeScript
/** The package's public entry points re-export the one shared contract. */
|
|
|
|
import { expect, it } from 'vitest'
|
|
import * as identity from '@deepseek-ai/dsh-experimental-liveshare-protocol/identity'
|
|
import * as protocol from '@deepseek-ai/dsh-experimental-liveshare-protocol/protocol'
|
|
import * as root from '@deepseek-ai/dsh-experimental-liveshare-protocol'
|
|
|
|
it('re-exports the protocol and identity contracts from the package root', () => {
|
|
expect(root.LIVESHARE_PROTOCOL_VERSION).toBe(protocol.LIVESHARE_PROTOCOL_VERSION)
|
|
expect(root.parseShareAccessState).toBe(protocol.parseShareAccessState)
|
|
expect(root.identityKeyOf).toBe(identity.identityKeyOf)
|
|
expect(root.MockIdentityProvider).toBe(identity.MockIdentityProvider)
|
|
expect(root.viewerCarrierScript).toBeTypeOf('function')
|
|
})
|
|
|
|
it('re-exports the identity contract from its own entry', () => {
|
|
expect(identity.identityKeyOf({ providerId: 'p', tenantId: 't', subjectId: 's' })).toBe('p:t:s')
|
|
expect(identity.identityFromKey('p:t:s')).toEqual({ providerId: 'p', tenantId: 't', subjectId: 's' })
|
|
expect(identity.identityFromKey('p:t')).toBeUndefined()
|
|
expect(identity.identityFromKey('p::s')).toBeUndefined()
|
|
})
|