test(auth): tighten R25 + sign-in controller assertions per code review

Code-quality reviewer flagged:
- R25 'malformed output' tests used .rejects.toThrow(/parse|invalid/i)
  which could match unrelated errors. Replaced with
  .rejects.toBeInstanceOf(ZodError) for both sign-in and sign-up.
- sign-in controller test asserted result.name only as truthy; the
  parallel sign-up test was already precise (toBe('session')). Tightened
  to match.

61 tests still passing for @repo/auth.
This commit is contained in:
2026-05-06 13:03:37 +02:00
parent 5b61674fe9
commit 70c7b7dfe7
3 changed files with 5 additions and 4 deletions

View File

@@ -20,8 +20,7 @@ describe("signInController", () => {
username: "alice",
password: "testpassword",
});
expect(result).toBeDefined();
expect(result.name).toBeTruthy();
expect(result.name).toBe("session");
expect(result.value).toBeTruthy();
});