@@ -168,13 +168,25 @@ test.describe('Edge runtime', () => {
168
168
expect ( edgerouteTransaction2 . contexts ?. trace ?. op ) . toBe ( 'http.server' ) ;
169
169
expect ( edgerouteTransaction3 . contexts ?. trace ?. op ) . toBe ( 'http.server' ) ;
170
170
171
- expect ( edgerouteTransaction1 . spans ?. length ) . toBe ( 1 ) ;
172
- expect ( edgerouteTransaction2 . spans ?. length ) . toBe ( 1 ) ;
173
- expect ( edgerouteTransaction3 . spans ?. length ) . toBe ( 1 ) ;
174
-
175
- expect ( edgerouteTransaction1 . spans ?. [ 0 ] . description ) . toBe ( 'GET https://github.com/' ) ;
176
- expect ( edgerouteTransaction2 . spans ?. [ 0 ] . description ) . toBe ( 'GET https://github.com/' ) ;
177
- expect ( edgerouteTransaction3 . spans ?. [ 0 ] . description ) . toBe ( 'GET https://github.com/' ) ;
171
+ expect ( edgerouteTransaction1 . spans ) . toContainEqual ( {
172
+ description : 'GET https://github.com/' ,
173
+ } ) ;
174
+ expect ( edgerouteTransaction2 . spans ) . toContainEqual ( {
175
+ description : 'GET https://github.com/' ,
176
+ } ) ;
177
+ expect ( edgerouteTransaction3 . spans ) . toContainEqual ( {
178
+ description : 'GET https://github.com/' ,
179
+ } ) ;
180
+ // Does not contain span that is sent to the event proxy server
181
+ expect ( edgerouteTransaction1 . spans ) . not . toContainEqual ( {
182
+ description : expect . stringContaining ( 'https://localhost:3031' ) ,
183
+ } ) ;
184
+ expect ( edgerouteTransaction2 . spans ) . not . toContainEqual ( {
185
+ description : expect . stringContaining ( 'https://localhost:3031' ) ,
186
+ } ) ;
187
+ expect ( edgerouteTransaction3 . spans ) . not . toContainEqual ( {
188
+ description : expect . stringContaining ( 'https://localhost:3031' ) ,
189
+ } ) ;
178
190
} ) ;
179
191
} ) ;
180
192
0 commit comments