diff --git a/packages/client/ui-trajectory/tests/client-bundle.client.spec.ts b/packages/client/ui-trajectory/tests/client-bundle.client.spec.ts index a50cf0fe4d..8a6751993a 100644 --- a/packages/client/ui-trajectory/tests/client-bundle.client.spec.ts +++ b/packages/client/ui-trajectory/tests/client-bundle.client.spec.ts @@ -11,7 +11,7 @@ import { readFileSync } from 'node:fs' import { resolve } from 'node:path' import { Context } from '@deepseek-ai/cordis' import { stubConfigForm } from '@deepseek-ai/dsh-client-test-runtime' -import { afterEach, describe, expect, it } from 'vitest' +import { afterEach, describe, expect, it, onTestFinished } from 'vitest' import { UiConversation } from '@deepseek-ai/dsh-client-ui-conversation/client' import { SlotRegistry } from '@deepseek-ai/dsh-client-ui-renderer/client' @@ -73,6 +73,7 @@ describe('tsdown client artifact', () => { it.skipIf(code === undefined)('mounted as an object plugin, apply registers the view tab on the real ring', async () => { const { exports } = await loadArtifact() const ctx = new Context() + onTestFinished(() => ctx.fiber.dispose()) const slots = new SlotRegistry(ctx) ctx.provide('uiSession', { provide: () => () => {} } as never) // The conversation entry's role: the ring must be declared before riders land. @@ -92,7 +93,7 @@ describe('tsdown client artifact', () => { ctx.provide('remote', { $on: () => () => {} } as never) ctx.provide('configForms', { developerTools: { enabled: createSnapshotStore(true) }, get: () => stubConfigForm().scope } as never) const locale = await import('@deepseek-ai/dsh-client-locale/client') - ctx.plugin({ inject: [...locale.inject], apply: locale.apply }) + await ctx.plugin({ inject: [...locale.inject], apply: locale.apply }) const fiber = ctx.plugin(exports as { apply: (ctx: Context) => void }) await fiber.await() expect(slots.entries('conversation.view').map(e => e.options.id)).toEqual(['trajectory'])