File tree Expand file tree Collapse file tree 2 files changed +18
-22
lines changed
dev-packages/browser-integration-tests/suites/integrations/supabase Expand file tree Collapse file tree 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';
33import { createClient } from '@supabase/supabase-js' ;
44window . Sentry = Sentry ;
55
6- const queues = createClient ( 'https://test.supabase.co' , 'test-key' , {
6+ const supabaseClient = createClient ( 'https://test.supabase.co' , 'test-key' , {
77 db : {
88 schema : 'pgmq_public' ,
99 } ,
1010} ) ;
1111
1212Sentry . init ( {
1313 dsn : 'https://public@dsn.ingest.sentry.io/1337' ,
14- integrations : [ Sentry . browserTracingIntegration ( ) , Sentry . supabaseIntegration ( queues ) ] ,
14+ integrations : [ Sentry . browserTracingIntegration ( ) , Sentry . supabaseIntegration ( { supabaseClient } ) ] ,
1515 tracesSampleRate : 1.0 ,
1616} ) ;
1717
1818// Simulate queue operations
1919async function performQueueOperations ( ) {
2020 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+ } ) ;
2525
26- await queues . rpc ( 'dequeue' , {
27- queue_name : 'todos' ,
28- } ) ;
26+ await supabaseClient . rpc ( 'dequeue' , {
27+ queue_name : 'todos' ,
28+ } ) ;
2929 } catch ( error ) {
3030 Sentry . captureException ( error ) ;
3131 }
Original file line number Diff line number Diff line change @@ -3,33 +3,29 @@ import * as Sentry from '@sentry/browser';
33import { createClient } from '@supabase/supabase-js' ;
44window . Sentry = Sentry ;
55
6- const queues = createClient ( 'https://test.supabase.co' , 'test-key' , {
6+ const supabaseClient = createClient ( 'https://test.supabase.co' , 'test-key' , {
77 db : {
88 schema : 'pgmq_public' ,
99 } ,
1010} ) ;
1111
1212Sentry . init ( {
1313 dsn : 'https://public@dsn.ingest.sentry.io/1337' ,
14- integrations : [ Sentry . browserTracingIntegration ( ) , Sentry . supabaseIntegration ( queues ) ] ,
14+ integrations : [ Sentry . browserTracingIntegration ( ) , Sentry . supabaseIntegration ( { supabaseClient } ) ] ,
1515 tracesSampleRate : 1.0 ,
1616} ) ;
1717
1818// Simulate queue operations
1919async function performQueueOperations ( ) {
2020 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+ } ) ;
2725
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+ } ) ;
3329 } catch ( error ) {
3430 Sentry . captureException ( error ) ;
3531 }
You can’t perform that action at this time.
0 commit comments