(status: string)
| 112 | ); |
| 113 | const mockCustomerUpdate = vi.fn(); |
| 114 | const generateMockSubCreate = (status: string) => () => |
| 115 | Promise.resolve({ |
| 116 | id: testSubscriptionId, |
| 117 | latest_invoice: { |
| 118 | payment_intent: { |
| 119 | client_secret: 'superSecret', |
| 120 | status |
| 121 | } |
| 122 | } |
| 123 | }); |
| 124 | const defaultError = () => |
| 125 | Promise.reject(new Error('Stripe encountered an error')); |
| 126 |