This repository was archived by the owner on Oct 9, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 11import { PostgrestClient } from '../src/index'
22import { Database } from './types.override'
3+ import { Database as DatabasePostgrest13 } from './types.override-with-options-postgrest13'
34import { expectType } from 'tsd'
45import { InvalidMethodError } from '../src/PostgrestFilterBuilder'
56
67const REST_URL_13 = 'http://localhost:3001'
7- const postgrest13 = new PostgrestClient < Database , { postgrestVersion : 13 } > ( REST_URL_13 )
8+ const postgrest13 = new PostgrestClient < DatabasePostgrest13 > ( REST_URL_13 )
89const postgrest12 = new PostgrestClient < Database > ( REST_URL_13 )
910
1011describe ( 'maxAffected' , ( ) => {
@@ -75,7 +76,7 @@ describe('maxAffected', () => {
7576 . maxAffected ( 2 )
7677 const { error } = result
7778 expect ( error ) . toBeDefined ( )
78- expect ( error ?. message ) . toBe ( 'Query result exceeds max-affected preference constraint ' )
79+ expect ( error ?. code ) . toBe ( 'PGRST124 ' )
7980 } )
8081
8182 test ( 'update should succeed when within maxAffected limit' , async ( ) => {
@@ -114,7 +115,7 @@ describe('maxAffected', () => {
114115 . select ( )
115116
116117 expect ( error ) . toBeDefined ( )
117- expect ( error ?. message ) . toBe ( 'Query result exceeds max-affected preference constraint ' )
118+ expect ( error ?. code ) . toBe ( 'PGRST124 ' )
118119 } )
119120
120121 test ( 'delete should succeed when within maxAffected limit' , async ( ) => {
You can’t perform that action at this time.
0 commit comments