invariant.client.spec.ts 973 B

12345678910111213141516171819202122232425
  1. /** The package's node half: an empty host body and an explained empty invariant companion. */
  2. import { describe, expect, it } from 'vitest'
  3. import { Context } from '@deepseek-ai/cordis'
  4. import InvariantRegistry from '@deepseek-ai/dsh-invariants'
  5. import * as PluginConfigInvariant from '@deepseek-ai/dsh-client-ui-settings-plugins/invariant'
  6. describe('invariant companion', () => {
  7. it('reserves package ownership with an empty installer', async () => {
  8. const ctx = new Context()
  9. await ctx.plugin(InvariantRegistry, { enabled: true })
  10. await expect(ctx.plugin(PluginConfigInvariant).await()).resolves.toBeDefined()
  11. })
  12. it('has an empty node half', async () => {
  13. const { apply } = await import('@deepseek-ai/dsh-client-ui-settings-plugins')
  14. // The host body exists only so the plugin appears in the host cordis.yml;
  15. // every surface this package ships lives in the browser half.
  16. apply()
  17. expect(typeof apply).toBe('function')
  18. })
  19. })