Skip to content

Commit 4524e8f

Browse files
Update teams-invite.test.ts
1 parent d7ef6a2 commit 4524e8f

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

tests/teams-invite.test.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,16 @@ import { main } from '../src/functions/teams/invite/handler';
44
import { createEvent, mockContext } from './helper';
55
import { teamInviteLogic } from '../src/util';
66

7-
// Tell Jest to replace the util module with a mock that exports teamInviteLogic
7+
// tell Jest to replace the util module with a mock that exports teamInviteLogic
88
jest.mock('../src/util', () => ({
99
teamInviteLogic: jest.fn(),
1010
}));
1111

12-
// Type the mocked function
13-
type TeamInviteResp = { statusCode: number; body: string };
12+
interface TeamInviteResp {
13+
statusCode: number;
14+
body: string;
15+
}
16+
1417
const mockTeamInvite = teamInviteLogic as unknown as jest.MockedFunction<
1518
(authEmail: string, authToken: string, teamId: string, emails: string[]) => Promise<TeamInviteResp>
1619
>;

0 commit comments

Comments
 (0)