Skip to content

Commit 4cfbcbb

Browse files
committed
simplify TestableSupabaseClient
1 parent a46b4e3 commit 4cfbcbb

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

test/unit/SupabaseClient.test.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,10 @@
11
import { PostgrestClient } from '@supabase/postgrest-js'
22
import { createClient, SupabaseClient } from '../../src/index'
33
import { Database } from '../types'
4-
import type { GenericSchema } from '../../src/lib/types'
54
import type { AuthChangeEvent } from '@supabase/auth-js'
65

76
// Testable subclass to expose protected methods/properties for testing
8-
class TestableSupabaseClient<
9-
DB = any,
10-
SN extends string & keyof DB = 'public' extends keyof DB ? 'public' : string & keyof DB,
11-
S extends GenericSchema = DB[SN] extends GenericSchema ? DB[SN] : any
12-
> extends SupabaseClient<DB, SN, S> {
7+
class TestableSupabaseClient extends SupabaseClient {
138
public getAccessToken = this._getAccessToken.bind(this)
149
public listenForAuthEvents = this._listenForAuthEvents.bind(this)
1510
public get changedAccessTokenPublic() {

0 commit comments

Comments
 (0)