Skip to content

Commit f0eb70f

Browse files
committed
chore: update tests
1 parent a376d5f commit f0eb70f

File tree

6 files changed

+9
-9
lines changed

6 files changed

+9
-9
lines changed

test/basic.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ describe('custom prefer headers with ', () => {
319319
})
320320

321321
test('switch schema', async () => {
322-
const postgrest = new PostgrestClient<Database, { postgrestVersion: '12' }, 'personal'>(
322+
const postgrest = new PostgrestClient<Database, { PostgrestVersion: '12' }, 'personal'>(
323323
REST_URL,
324324
{
325325
schema: 'personal',

test/index.test-d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -297,9 +297,9 @@ const postgrestWithOptions = new PostgrestClient<DatabaseWithOptions>(REST_URL)
297297
}[]
298298
>(result.data)
299299
}
300-
// Check that client options __internal_supabase isn't considered like the other schemas
300+
// Check that client options __InternalSupabase isn't considered like the other schemas
301301
{
302302
await postgrestWithOptions
303303
// @ts-expect-error supabase internal shouldn't be available as one of the selectable schema
304-
.schema('__internal_supabase')
304+
.schema('__InternalSupabase')
305305
}

test/relationships.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { Database as DatabaseWithOptions13 } from './types.override-with-options
55
const REST_URL = 'http://localhost:3000'
66
export const postgrest = new PostgrestClient<Database>(REST_URL)
77
const REST_URL_13 = 'http://localhost:3001'
8-
const postgrest13 = new PostgrestClient<Database, { postgrestVersion: '13' }>(REST_URL_13)
8+
const postgrest13 = new PostgrestClient<Database, { PostgrestVersion: '13' }>(REST_URL_13)
99
const postgrest13FromDatabaseTypes = new PostgrestClient<DatabaseWithOptions13>(REST_URL_13)
1010

1111
const userColumn: 'catchphrase' | 'username' = 'username'

test/returns.test-d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ const postgrest = new PostgrestClient<Database>(REST_URL)
5353
.returns<{ username: string }[]>()
5454
expectType<
5555
PostgrestBuilder<
56-
{ postgrestVersion: '12' },
56+
{ PostgrestVersion: '12' },
5757
{
5858
Error: 'Type mismatch: Cannot cast single object to array type. Remove Array wrapper from return type or make sure you are not using .single() up in the calling chain'
5959
},

test/select-query-parser/result.test-d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ type SelectQueryFromTableResult<
1616
TableName,
1717
Database['public']['Tables'][TableName]['Relationships'],
1818
Q,
19-
{ postgrestVersion: '12' }
19+
{ PostgrestVersion: '12' }
2020
>
2121

2222
// This test file is here to help develop, debug and maintain the GetResult
@@ -132,7 +132,7 @@ type SelectQueryFromTableResult<
132132
TableName,
133133
Database['personal']['Tables'][TableName]['Relationships'],
134134
Q,
135-
{ postgrestVersion: '12' }
135+
{ PostgrestVersion: '12' }
136136
>
137137
// Should work with Json object accessor
138138
{

test/types.generated-with-options-postgrest13.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ export type Json = unknown
33
export type Database = {
44
// This is a dummy non existent schema to allow automatically passing down options
55
// to the instanciated client at type levels from the introspected database
6-
__internal_supabase: {
7-
postgrestVersion: '13.0.12'
6+
__InternalSupabase: {
7+
PostgrestVersion: '13.0.12'
88
// We make this still abide to `GenericSchema` to allow types helpers bellow to work the same
99
Tables: {
1010
[_ in never]: never

0 commit comments

Comments
 (0)