MCPcopy Index your code
hub / github.com/freeCodeCamp/freeCodeCamp / generateMockSubCreate

Function generateMockSubCreate

api/src/routes/protected/donate.test.ts:114–123  ·  view source on GitHub ↗
(status: string)

Source from the content-addressed store, hash-verified

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

Callers 1

donate.test.tsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected