File tree Expand file tree Collapse file tree 2 files changed +28
-3
lines changed Expand file tree Collapse file tree 2 files changed +28
-3
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,32 @@ test('basic select table', async () => {
11
11
12
12
test ( 'basic select view' , async ( ) => {
13
13
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
+ ` )
15
40
} )
16
41
17
42
test ( 'rpc' , async ( ) => {
@@ -423,5 +448,5 @@ test('cannot update non-updatable views', () => {
423
448
424
449
test ( 'cannot update non-updatable columns' , ( ) => {
425
450
// @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 } )
427
452
} )
Original file line number Diff line number Diff line change @@ -78,7 +78,7 @@ test('csv', async () => {
78
78
} )
79
79
80
80
test ( 'abort signal' , async ( ) => {
81
- const ac = new AbortController ( )
81
+ const ac = new AbortController ( ) as globalThis . AbortController
82
82
ac . abort ( )
83
83
const res = await postgrest . from ( 'users' ) . select ( ) . abortSignal ( ac . signal )
84
84
expect ( res ) . toMatchInlineSnapshot ( `
You can’t perform that action at this time.
0 commit comments