Browse Source

test(ui-layout): provide theme connection seam

Yichen Jiang 2 months ago
parent
commit
40a4c45e86
1 changed files with 3 additions and 2 deletions
  1. 3 2
      packages/client/ui-layout/tests/apply.spec.ts

+ 3 - 2
packages/client/ui-layout/tests/apply.spec.ts

@@ -18,9 +18,10 @@ import * as invariant from '@deepseek-ai/dsh-client-ui-layout/invariant'
 async function bench() {
 async function bench() {
   const ctx = new Context()
   const ctx = new Context()
   const slotsFiber = ctx.plugin(SlotsService)
   const slotsFiber = ctx.plugin(SlotsService)
-  // Theme now injects ['slots', 'locale'] (it registers its Appearance
-  // settings row); seat a real locale service so the theme fiber activates.
+  // Theme registers its Appearance settings row and requires the connection
+  // seam for persistence; model this bench as a remote, memory-only browser.
   ctx.provide('locale', new LocaleService(ctx))
   ctx.provide('locale', new LocaleService(ctx))
+  ctx.provide('connection', { api: { settings: {} }, isLoopback: false } as never)
   await ctx.plugin({ inject: themeInject, apply: themeApply }).await()
   await ctx.plugin({ inject: themeInject, apply: themeApply }).await()
   await slotsFiber.await()
   await slotsFiber.await()
   return { ctx, slots: ctx.get('slots') as SlotsService }
   return { ctx, slots: ctx.get('slots') as SlotsService }