File tree 2 files changed +18
-22
lines changed
dev-packages/browser-integration-tests/suites/integrations/supabase
2 files changed +18
-22
lines changed Original file line number Diff line number Diff line change @@ -3,29 +3,29 @@ import * as Sentry from '@sentry/browser';
3
3
import { createClient } from '@supabase/supabase-js' ;
4
4
window . Sentry = Sentry ;
5
5
6
- const queues = createClient ( 'https://test.supabase.co' , 'test-key' , {
6
+ const supabaseClient = createClient ( 'https://test.supabase.co' , 'test-key' , {
7
7
db : {
8
8
schema : 'pgmq_public' ,
9
9
} ,
10
10
} ) ;
11
11
12
12
Sentry . init ( {
13
13
dsn :
'https://[email protected] /1337' ,
14
- integrations : [ Sentry . browserTracingIntegration ( ) , Sentry . supabaseIntegration ( queues ) ] ,
14
+ integrations : [ Sentry . browserTracingIntegration ( ) , Sentry . supabaseIntegration ( { supabaseClient } ) ] ,
15
15
tracesSampleRate : 1.0 ,
16
16
} ) ;
17
17
18
18
// Simulate queue operations
19
19
async function performQueueOperations ( ) {
20
20
try {
21
- await queues . rpc ( 'enqueue' , {
22
- queue_name : 'todos' ,
23
- msg : { title : 'Test Todo' } ,
24
- } ) ;
21
+ await supabaseClient . rpc ( 'enqueue' , {
22
+ queue_name : 'todos' ,
23
+ msg : { title : 'Test Todo' } ,
24
+ } ) ;
25
25
26
- await queues . rpc ( 'dequeue' , {
27
- queue_name : 'todos' ,
28
- } ) ;
26
+ await supabaseClient . rpc ( 'dequeue' , {
27
+ queue_name : 'todos' ,
28
+ } ) ;
29
29
} catch ( error ) {
30
30
Sentry . captureException ( error ) ;
31
31
}
Original file line number Diff line number Diff line change @@ -3,33 +3,29 @@ import * as Sentry from '@sentry/browser';
3
3
import { createClient } from '@supabase/supabase-js' ;
4
4
window . Sentry = Sentry ;
5
5
6
- const queues = createClient ( 'https://test.supabase.co' , 'test-key' , {
6
+ const supabaseClient = createClient ( 'https://test.supabase.co' , 'test-key' , {
7
7
db : {
8
8
schema : 'pgmq_public' ,
9
9
} ,
10
10
} ) ;
11
11
12
12
Sentry . init ( {
13
13
dsn :
'https://[email protected] /1337' ,
14
- integrations : [ Sentry . browserTracingIntegration ( ) , Sentry . supabaseIntegration ( queues ) ] ,
14
+ integrations : [ Sentry . browserTracingIntegration ( ) , Sentry . supabaseIntegration ( { supabaseClient } ) ] ,
15
15
tracesSampleRate : 1.0 ,
16
16
} ) ;
17
17
18
18
// Simulate queue operations
19
19
async function performQueueOperations ( ) {
20
20
try {
21
- await queues
22
- . schema ( 'pgmq_public' )
23
- . rpc ( 'enqueue' , {
24
- queue_name : 'todos' ,
25
- msg : { title : 'Test Todo' } ,
26
- } ) ;
21
+ await supabaseClient . schema ( 'pgmq_public' ) . rpc ( 'enqueue' , {
22
+ queue_name : 'todos' ,
23
+ msg : { title : 'Test Todo' } ,
24
+ } ) ;
27
25
28
- await queues
29
- . schema ( 'pgmq_public' )
30
- . rpc ( 'dequeue' , {
31
- queue_name : 'todos' ,
32
- } ) ;
26
+ await supabaseClient . schema ( 'pgmq_public' ) . rpc ( 'dequeue' , {
27
+ queue_name : 'todos' ,
28
+ } ) ;
33
29
} catch ( error ) {
34
30
Sentry . captureException ( error ) ;
35
31
}
You can’t perform that action at this time.
0 commit comments