Skip to content
This repository was archived by the owner on Oct 9, 2025. It is now read-only.

Commit a1ee43b

Browse files
committed
test: don't mutate PostgrestClient.headers
1 parent 3100a04 commit a1ee43b

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

test/__snapshots__/basic.test.ts.snap

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -580,6 +580,8 @@ Object {
580580
}
581581
`;
582582

583+
exports[`don't mutate PostgrestClient.headers 1`] = `null`;
584+
583585
exports[`missing table 1`] = `
584586
Object {
585587
"body": null,

test/basic.test.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,3 +120,9 @@ test('custom type', async () => {
120120
// Autocomplete should show properties of user after '.'
121121
user.username
122122
})
123+
124+
test("don't mutate PostgrestClient.headers", async () => {
125+
await postgrest.from('users').select().limit(1).single()
126+
const { error } = await postgrest.from('users').select()
127+
expect(error).toMatchSnapshot()
128+
})

0 commit comments

Comments
 (0)