fix: address Phase 1 code-quality review findings
- Generator feature templates emit ctx-arg signatures + updated checklist - signUpUseCase test for bus=undefined path - di-explainer.html: bind-dev-seed no-arg → ctx - data-flow-explainer.html: tradeoff card → ctx - BindContextBase no longer exported - CLAUDE.md binder bullet: drop vestigial cast guidance Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -60,6 +60,21 @@ describe("signUpUseCase", () => {
|
||||
);
|
||||
});
|
||||
|
||||
it("works without an event bus (welcome email skipped silently)", async () => {
|
||||
const users = new MockUsersRepository([]);
|
||||
const auth = new MockAuthenticationService(users);
|
||||
const useCase = signUpUseCase(users, auth, undefined);
|
||||
|
||||
const result = await useCase({
|
||||
username: "frank",
|
||||
password: "secret_password",
|
||||
confirmPassword: "secret_password",
|
||||
});
|
||||
|
||||
expect(result.session.userId).toBeTruthy();
|
||||
expect(result.cookie.name).toBe("session");
|
||||
});
|
||||
|
||||
it("does NOT publish when sign-up fails (username taken)", async () => {
|
||||
const users = new MockUsersRepository([]);
|
||||
const auth = new MockAuthenticationService(users);
|
||||
|
||||
Reference in New Issue
Block a user