()
| 89 | } |
| 90 | |
| 91 | function makeContext() { |
| 92 | return { |
| 93 | workspaceId: 'ws-1', |
| 94 | inviterId: 'user-1', |
| 95 | inviterName: 'Owner', |
| 96 | inviterEmail: 'owner@example.com', |
| 97 | workspaceDetails: { |
| 98 | id: 'ws-1', |
| 99 | name: 'Workspace 1', |
| 100 | ownerId: 'user-1', |
| 101 | organizationId: 'org-1', |
| 102 | billedAccountUserId: 'user-1', |
| 103 | }, |
| 104 | invitePolicy: { |
| 105 | allowed: true, |
| 106 | reason: null, |
| 107 | requiresSeat: false, |
| 108 | organizationId: 'org-1', |
| 109 | upgradeRequired: false, |
| 110 | }, |
| 111 | // The function only reads the fields above at runtime. |
| 112 | } as Parameters<typeof createWorkspaceInvitation>[0]['context'] |
| 113 | } |
| 114 | |
| 115 | const request = createMockRequest( |
| 116 | 'POST', |
no outgoing calls
no test coverage detected