This repository was archived by the owner on Oct 9, 2025. It is now read-only.
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 () => {
1111
1212test ( '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
1742test ( 'rpc' , async ( ) => {
@@ -423,5 +448,5 @@ test('cannot update non-updatable views', () => {
423448
424449test ( '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} )
Original file line number Diff line number Diff line change @@ -78,7 +78,7 @@ test('csv', async () => {
7878} )
7979
8080test ( '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 ( `
You can’t perform that action at this time.
0 commit comments