Full per-file coverage for the three settings packages: invariant companions, store mirroring with revision guards, behavior-shaped section/shell specs (props-fed, real store engine), and apply-level suites on a real Context + SlotCore covering declaration-aware deferral and HMR collapse recovery. All three registrants now judge presence on the slot ledger instead of a local disposer, which went stale when a parent redeclaration cascade removed the entry (ds-review-bot finding); the locale re-register path keeps the same idempotence.
19 lines
749 B
TypeScript
19 lines
749 B
TypeScript
import { describe, expect, it } from 'vitest'
|
|
import { Context } from 'cordis'
|
|
import * as SettingsInvariant from '@deepseek-ai/dsh-client-ui-settings/invariant'
|
|
import InvariantService from '@deepseek-ai/dsh-invariants'
|
|
|
|
describe('invariant companion', () => {
|
|
it('registers under the package name with an empty installer', async () => {
|
|
const ctx = new Context()
|
|
await ctx.plugin(InvariantService, { enabled: true })
|
|
await expect(ctx.plugin(SettingsInvariant).await()).resolves.toBeDefined()
|
|
})
|
|
|
|
it('node-half apply is a no-op host placeholder', async () => {
|
|
const { apply } = await import('@deepseek-ai/dsh-client-ui-settings')
|
|
apply()
|
|
expect(true).toBe(true) // reaching here without throw is the contract
|
|
})
|
|
})
|