feat(client): add the dsh-client-test-runtime package

A jsdom slot test runtime for feature specs: a real Cordis Context, the
production SlotsService and web-react renderer, and typed session/workspace
doubles (TestSessions implements ISessions with FixtureSession sessions;
TestWorkspaces implements IWorkspaces), so the compiler flags fixture drift
when a production face changes. Fixtures feed plain data: list rows,
conversation snapshots, and ISession-typed behavior stubs; provide-bundle
materialization runs the shared SessionProvideChannel.

DOM snapshot support: declare()/renderSlot() mount a single slot inside a
data-slot wrapper for local .snap capture, and a snapshot serializer folds
CSS-module class hashes to their semantic locals and collapses svg internals
to a content fingerprint. The typed provide() constrains declared-service
fakes to Partial of the service's outward face.
This commit is contained in:
imccyu
2026-07-28 23:04:22 +08:00
parent 0efc7f045e
commit 3f7a8c6f8e
20 changed files with 1928 additions and 0 deletions

View File

@@ -34,6 +34,7 @@
{ "path": "./packages/client/hmr" },
{ "path": "./packages/client/connection" },
{ "path": "./packages/client/runtime" },
{ "path": "./packages/client/test-runtime" },
{ "path": "./packages/client/ui-layout" },
{ "path": "./packages/client/ui-sidebar" },
{ "path": "./packages/client/ui-conversation" },