From 51b5f5b565b3170707f00be3e2ea590d59a65446 Mon Sep 17 00:00:00 2001 From: imccyu <276526105+imccyu@users.noreply.github.com> Date: Tue, 11 Aug 2026 20:14:36 +0800 Subject: [PATCH] test(picker): cover the node halves of the split directory-picker faces --- .../tests/client-flow.spec.tsx | 9 +++++++++ .../ui-directory-picker/tests/client-flow.spec.tsx | 9 +++++++++ 2 files changed, 18 insertions(+) diff --git a/packages/client/ui-directory-picker-native/tests/client-flow.spec.tsx b/packages/client/ui-directory-picker-native/tests/client-flow.spec.tsx index d501fdfce2..98d2611e01 100644 --- a/packages/client/ui-directory-picker-native/tests/client-flow.spec.tsx +++ b/packages/client/ui-directory-picker-native/tests/client-flow.spec.tsx @@ -7,6 +7,7 @@ import { SlotsService } from '@deepseek-ai/dsh-client-runtime/client' import type { DirectoryFlowOwnerProps } from '@deepseek-ai/dsh-client-ui-workspace/client' import { apply, inject } from '../src/client/index.ts' import { NativeDirectoryFlow } from '../src/client/flow.ts' +import { apply as nodeApply } from '../src/index.ts' afterEach(cleanup) @@ -225,3 +226,11 @@ describe('directory-picker-native client half', () => { expect(opened.container.innerHTML).toBe('') }) }) + +describe('directory-picker-native node half', () => { + // The invariant companion is mounted by the vitest-wide invariant host on + // every Context this suite creates; its registration is covered there. + it('the node apply is an inert loader seat', () => { + expect(() => { nodeApply() }).not.toThrow() + }) +}) diff --git a/packages/client/ui-directory-picker/tests/client-flow.spec.tsx b/packages/client/ui-directory-picker/tests/client-flow.spec.tsx index 69ea819564..4bc86bf5eb 100644 --- a/packages/client/ui-directory-picker/tests/client-flow.spec.tsx +++ b/packages/client/ui-directory-picker/tests/client-flow.spec.tsx @@ -9,6 +9,7 @@ import { usePinnedBrowserLanguages } from '@deepseek-ai/dsh-client-test-runtime' import type { DirectoryFlowOwnerProps } from '@deepseek-ai/dsh-client-ui-workspace/client' import { apply, inject } from '../src/client/index.ts' import { BrowseDirectoryFlow } from '../src/client/flow.ts' +import { apply as nodeApply } from '../src/index.ts' // The service reads its initial locale from the browser; these specs assert // the shipped Chinese copy, so they state the browser they assume. @@ -221,3 +222,11 @@ describe('directory-picker-browse client half', () => { expect(view.container.innerHTML).toBe('') }) }) + +describe('directory-picker-browse node half', () => { + // The invariant companion is mounted by the vitest-wide invariant host on + // every Context this suite creates; its registration is covered there. + it('the node apply is an inert loader seat', () => { + expect(() => { nodeApply() }).not.toThrow() + }) +})