Skip to content

Commit fb9965d

Browse files
committed
test: update snapshot
1 parent 4945f5e commit fb9965d

File tree

2 files changed

+28
-3
lines changed

2 files changed

+28
-3
lines changed

test/basic.ts

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,32 @@ test('basic select table', async () => {
1111

1212
test('basic select view', async () => {
1313
const res = await postgrest.from('updatable_view').select()
14-
expect(res).toMatchSnapshot()
14+
expect(res).toMatchInlineSnapshot(`
15+
Object {
16+
"count": undefined,
17+
"data": Array [
18+
Object {
19+
"non_updatable_column": 1,
20+
"username": "supabot",
21+
},
22+
Object {
23+
"non_updatable_column": 1,
24+
"username": "kiwicopple",
25+
},
26+
Object {
27+
"non_updatable_column": 1,
28+
"username": "awailas",
29+
},
30+
Object {
31+
"non_updatable_column": 1,
32+
"username": "dragarcia",
33+
},
34+
],
35+
"error": undefined,
36+
"status": 200,
37+
"statusText": "OK",
38+
}
39+
`)
1540
})
1641

1742
test('rpc', async () => {
@@ -423,5 +448,5 @@ test('cannot update non-updatable views', () => {
423448

424449
test('cannot update non-updatable columns', () => {
425450
// @ts-expect-error TS2322
426-
postgrest.from('updatable_view').update({ non_updatable_column: 0 as any })
451+
postgrest.from('updatable_view').update({ non_updatable_column: 0 })
427452
})

test/transforms.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ test('csv', async () => {
7878
})
7979

8080
test('abort signal', async () => {
81-
const ac = new AbortController()
81+
const ac = new AbortController() as globalThis.AbortController
8282
ac.abort()
8383
const res = await postgrest.from('users').select().abortSignal(ac.signal)
8484
expect(res).toMatchInlineSnapshot(`

0 commit comments

Comments
 (0)