2026-07-19 21:17:57 +08:00
|
|
|
import { describe, expect, it } from 'vitest'
|
2026-08-10 22:04:06 +08:00
|
|
|
import { Context } from '@deepseek-ai/cordis'
|
2026-07-19 21:17:57 +08:00
|
|
|
import * as SidebarInvariant from '@deepseek-ai/dsh-client-ui-sidebar/invariant'
|
2026-08-13 00:36:22 +08:00
|
|
|
import InvariantRegistry from '@deepseek-ai/dsh-invariants'
|
2026-07-19 21:17:57 +08:00
|
|
|
|
|
|
|
|
describe('invariant companion', () => {
|
|
|
|
|
it('registers under the package name with an empty installer', async () => {
|
|
|
|
|
const ctx = new Context()
|
2026-08-13 00:36:22 +08:00
|
|
|
await ctx.plugin(InvariantRegistry, { enabled: true })
|
2026-07-19 21:17:57 +08:00
|
|
|
await expect(ctx.plugin(SidebarInvariant).await()).resolves.toBeDefined()
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
it('node-half apply is a no-op host placeholder', async () => {
|
|
|
|
|
const { apply } = await import('@deepseek-ai/dsh-client-ui-sidebar')
|
|
|
|
|
apply()
|
|
|
|
|
expect(true).toBe(true) // reaching here without throw is the contract
|
|
|
|
|
})
|
|
|
|
|
})
|