test(coverage): cover the diff for ported auth + dsr changes

Close the cover-the-diff (L1, ADR-020) gaps the port opened:

- auth router: exercise the signUp/signOut procedure handlers through the
  container-resolved caller (reformatted onto new lines by the port).
- core-dsr export: add an audit-doc case with array-valued changedFields /
  piiCategories and an absent actorRoles, covering the optional-field
  branches of the new audit-trail mapper.
- coverage:diff excludes: mirror the vitest coverage excludes for
  core-trpc/src/providers/** and core-shared/src/trpc/context.ts so
  changes to coverage-excluded framework glue don't fail the diff gate.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016j8z4VHjedXDTjEDNg7qHK
This commit is contained in:
2026-07-13 06:14:42 +02:00
parent 932d7f381e
commit a80cf66026
3 changed files with 88 additions and 0 deletions

View File

@@ -66,6 +66,23 @@ describe("authRouter", () => {
.toConstantValue(original);
}
});
it("signUp resolves the container controller and returns a session", async () => {
const caller = authRouter.createCaller({});
const result = await caller.signUp({
username: "carol",
password: "password_carol",
confirmPassword: "password_carol",
});
expect(result.name).toBe("session");
});
it("signOut resolves the container controller (returns void)", async () => {
const caller = authRouter.createCaller({});
await expect(
caller.signOut({ sessionId: "some-session-id" }),
).resolves.toBeUndefined();
});
});
describe("authRouter error mapping", () => {