• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

supabase / supabase-js / 12290594479

12 Dec 2024 05:44AM UTC coverage: 67.633%. Remained the same
12290594479

Pull #1332

github

web-flow
Merge f8e48ffe8 into 1c5b626f6
Pull Request #1332: fix: Make the return value of accessToken nullable

41 of 79 branches covered (51.9%)

Branch coverage included in aggregate %.

99 of 128 relevant lines covered (77.34%)

4.63 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

68.18
/src/lib/constants.ts
1
// constants.ts
2
import { RealtimeClientOptions } from '@supabase/realtime-js'
3
import { SupabaseAuthClientOptions } from './types'
4
import { version } from './version'
4✔
5

6
let JS_ENV = ''
4✔
7
// @ts-ignore
8
if (typeof Deno !== 'undefined') {
4!
9
  JS_ENV = 'deno'
×
10
} else if (typeof document !== 'undefined') {
4!
11
  JS_ENV = 'web'
×
12
} else if (typeof navigator !== 'undefined' && navigator.product === 'ReactNative') {
4!
13
  JS_ENV = 'react-native'
×
14
} else {
15
  JS_ENV = 'node'
4✔
16
}
17

18
export const DEFAULT_HEADERS = { 'X-Client-Info': `supabase-js-${JS_ENV}/${version}` }
4✔
19

20
export const DEFAULT_GLOBAL_OPTIONS = {
4✔
21
  headers: DEFAULT_HEADERS,
22
}
23

24
export const DEFAULT_DB_OPTIONS = {
4✔
25
  schema: 'public',
26
}
27

28
export const DEFAULT_AUTH_OPTIONS: SupabaseAuthClientOptions = {
4✔
29
  autoRefreshToken: true,
30
  persistSession: true,
31
  detectSessionInUrl: true,
32
  flowType: 'implicit',
33
}
34

35
export const DEFAULT_REALTIME_OPTIONS: RealtimeClientOptions = {}
4✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc