Skip to content

Commit cb72c1c

Browse files
committed
🚨 Also assert validate() was called exactly once (#2446)
1 parent 0e5c172 commit cb72c1c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/test/lib/utils/authorship.test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,9 @@ describe('getLoggedInUser', () => {
7575
} as unknown as App.Locals;
7676

7777
const result = await getLoggedInUser(mockLocals);
78+
7879
expect(result).toEqual(mockUser);
80+
expect(mockLocals.auth.validate).toHaveBeenCalledTimes(1);
7981
});
8082

8183
test('expect to redirect when no session', async () => {

0 commit comments

Comments
 (0)