Skip to content

Commit 4466fa2

Browse files
committed
test(cloudflare): keep empty array fixtures intact
1 parent 5d9e7bf commit 4466fa2

1 file changed

Lines changed: 10 additions & 7 deletions

File tree

‎apps/sim/tools/cloudflare/request-boundary.test.ts‎

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,16 @@ describe('Cloudflare provider request boundaries', () => {
1515
}
1616
)
1717

18-
it.each([[], '[]'])('preserves an explicit R2 lifecycle clear (%j)', (rules) => {
19-
const body = updateR2BucketLifecycleTool.request.body
20-
if (!body) throw new Error('Expected a request body')
21-
expect(body({ apiKey: 'token', accountId: 'account', bucketName: 'bucket', rules })).toEqual({
22-
rules: [],
23-
})
24-
})
18+
it.each([{ rules: [] }, { rules: '[]' }])(
19+
'preserves an explicit R2 lifecycle clear (%j)',
20+
({ rules }) => {
21+
const body = updateR2BucketLifecycleTool.request.body
22+
if (!body) throw new Error('Expected a request body')
23+
expect(body({ apiKey: 'token', accountId: 'account', bucketName: 'bucket', rules })).toEqual({
24+
rules: [],
25+
})
26+
}
27+
)
2528

2629
it('preserves every explicitly supplied R2 lifecycle rule', () => {
2730
const body = updateR2BucketLifecycleTool.request.body

0 commit comments

Comments
 (0)