2026-08-11 06:46:41 -07:00
|
|
|
import { Context } from '@deepseek-ai/cordis'
|
|
|
|
|
import { describe, expect, it } from 'vitest'
|
2026-08-13 00:36:22 +08:00
|
|
|
import InvariantRegistry from '@deepseek-ai/dsh-invariants'
|
2026-08-11 06:46:41 -07:00
|
|
|
import * as PluginInventoryInvariant from '../src/invariant.ts'
|
|
|
|
|
|
|
|
|
|
describe('plugin-inventory invariant companion', () => {
|
|
|
|
|
it('registers the package-owned empty installer', async () => {
|
|
|
|
|
const ctx = new Context()
|
2026-08-13 00:36:22 +08:00
|
|
|
await ctx.plugin(InvariantRegistry, { enabled: true })
|
2026-08-11 06:46:41 -07:00
|
|
|
const fiber = ctx.plugin(PluginInventoryInvariant)
|
|
|
|
|
await expect(fiber.await()).resolves.toBeDefined()
|
|
|
|
|
await fiber.dispose()
|
|
|
|
|
await expect(ctx.plugin(PluginInventoryInvariant).await()).resolves.toBeDefined()
|
|
|
|
|
await ctx.fiber.dispose()
|
|
|
|
|
})
|
|
|
|
|
})
|