@@ -3,21 +3,21 @@ import type { Span } from '@sentry/core';
33import * as SentryCore from '@sentry/core' ;
44import { afterAll , afterEach , beforeAll , beforeEach , describe , expect , it , type MockInstance , vi } from 'vitest' ;
55import {
6- CHANNELS ,
76 makeRequest ,
87 makeSpan ,
9- setupRemixChannelIntegration ,
8+ setupRemixInstrumentation ,
109 teardownTestAsyncContextStrategy ,
1110} from './tracing-channel-test-utils' ;
11+ import { remixChannels } from '@sentry/server-utils/orchestrion' ;
1212
13- describe ( 'remixChannelIntegration ' , ( ) => {
13+ describe ( 'remixIntegration (Orchestrion-based) ' , ( ) => {
1414 let startInactiveSpanSpy : MockInstance ;
1515 let getActiveSpanSpy : MockInstance ;
1616 let span : Span ;
1717
1818 beforeAll ( ( ) => {
1919 // Configure form-data capture so the ACTION span also extracts the mapped keys.
20- setupRemixChannelIntegration ( { _action : 'actionType' } ) ;
20+ setupRemixInstrumentation ( { _action : 'actionType' } ) ;
2121 } ) ;
2222
2323 afterAll ( ( ) => {
@@ -39,7 +39,7 @@ describe('remixChannelIntegration', () => {
3939 it ( 'requestHandler: builds the http.server span and sets the response status' , async ( ) => {
4040 const ctx = { arguments : [ makeRequest ( { method : 'GET' , url : 'http://localhost/users' } ) ] } ;
4141
42- await tracingChannel ( CHANNELS . REQUEST_HANDLER ) . tracePromise ( async ( ) => ( { status : 200 } ) , ctx ) ;
42+ await tracingChannel ( remixChannels . REMIX_REQUEST_HANDLER ) . tracePromise ( async ( ) => ( { status : 200 } ) , ctx ) ;
4343
4444 expect ( startInactiveSpanSpy ) . toHaveBeenCalledWith (
4545 expect . objectContaining ( {
@@ -65,7 +65,7 @@ describe('remixChannelIntegration', () => {
6565 result : [ { route : { path : 'users/:userId' , id : 'routes/users.$userId' } } ] ,
6666 } ;
6767
68- tracingChannel ( CHANNELS . MATCH_SERVER_ROUTES ) . traceSync ( ( ) => ctx . result , ctx ) ;
68+ tracingChannel ( remixChannels . REMIX_MATCH_SERVER_ROUTES ) . traceSync ( ( ) => ctx . result , ctx ) ;
6969
7070 expect ( span . setAttribute ) . toHaveBeenCalledWith ( 'http.route' , 'users/:userId' ) ;
7171 expect ( span . setAttribute ) . toHaveBeenCalledWith ( 'match.route.id' , 'routes/users.$userId' ) ;
@@ -76,7 +76,7 @@ describe('remixChannelIntegration', () => {
7676 getActiveSpanSpy . mockReturnValue ( undefined ) ;
7777 const ctx = { arguments : [ ] , result : [ { route : { path : 'users/:userId' , id : 'x' } } ] } ;
7878
79- tracingChannel ( CHANNELS . MATCH_SERVER_ROUTES ) . traceSync ( ( ) => ctx . result , ctx ) ;
79+ tracingChannel ( remixChannels . REMIX_MATCH_SERVER_ROUTES ) . traceSync ( ( ) => ctx . result , ctx ) ;
8080
8181 expect ( span . setAttribute ) . not . toHaveBeenCalled ( ) ;
8282 } ) ;
@@ -92,7 +92,7 @@ describe('remixChannelIntegration', () => {
9292 ] ,
9393 } ;
9494
95- await tracingChannel ( CHANNELS . CALL_ROUTE_LOADER ) . tracePromise ( async ( ) => ( { status : 200 } ) , ctx ) ;
95+ await tracingChannel ( remixChannels . REMIX_CALL_ROUTE_LOADER ) . tracePromise ( async ( ) => ( { status : 200 } ) , ctx ) ;
9696
9797 expect ( startInactiveSpanSpy ) . toHaveBeenCalledWith (
9898 expect . objectContaining ( {
@@ -116,7 +116,7 @@ describe('remixChannelIntegration', () => {
116116 getActiveSpanSpy . mockReturnValue ( undefined ) ;
117117 const ctx = { arguments : [ { routeId : 'x' , request : makeRequest ( ) , params : { } } ] } ;
118118
119- await tracingChannel ( CHANNELS . CALL_ROUTE_LOADER ) . tracePromise ( async ( ) => ( { status : 200 } ) , ctx ) ;
119+ await tracingChannel ( remixChannels . REMIX_CALL_ROUTE_LOADER ) . tracePromise ( async ( ) => ( { status : 200 } ) , ctx ) ;
120120
121121 expect ( startInactiveSpanSpy ) . not . toHaveBeenCalled ( ) ;
122122 } ) ;
@@ -132,7 +132,7 @@ describe('remixChannelIntegration', () => {
132132 ] ,
133133 } ;
134134
135- await tracingChannel ( CHANNELS . CALL_ROUTE_ACTION ) . tracePromise ( async ( ) => ( { status : 201 } ) , ctx ) ;
135+ await tracingChannel ( remixChannels . REMIX_CALL_ROUTE_ACTION ) . tracePromise ( async ( ) => ( { status : 201 } ) , ctx ) ;
136136
137137 expect ( startInactiveSpanSpy ) . toHaveBeenCalledWith (
138138 expect . objectContaining ( {
0 commit comments