Skip to content

Commit 5ebcf93

Browse files
committed
test(billing): model six-item Stripe page boundary in pagination mocks
1 parent 5261c72 commit 5ebcf93

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

apps/sim/app/api/billing/invoices/route.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ describe('GET /api/billing/invoices', () => {
9797
})
9898

9999
it('pages through further drafts to confirm hasMore when the first page is inconclusive', async () => {
100-
const firstPage = Array.from({ length: 11 }, () => makeInvoice({ status: 'draft' }))
100+
const firstPage = Array.from({ length: 6 }, () => makeInvoice({ status: 'draft' }))
101101
mockStripeInvoicesList
102102
.mockResolvedValueOnce({ data: firstPage, has_more: true })
103103
.mockResolvedValueOnce({ data: [makeInvoice()], has_more: false })
@@ -117,7 +117,7 @@ describe('GET /api/billing/invoices', () => {
117117

118118
it('reports hasMore when the MAX_STRIPE_PAGES safety cap is hit while Stripe still has more', async () => {
119119
mockStripeInvoicesList.mockResolvedValue({
120-
data: Array.from({ length: 11 }, () => makeInvoice({ status: 'draft' })),
120+
data: Array.from({ length: 6 }, () => makeInvoice({ status: 'draft' })),
121121
has_more: true,
122122
})
123123

0 commit comments

Comments
 (0)