Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mydea committed May 21, 2024
1 parent d5d7afe commit 2924ab2
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ describe('express tracing experimental', () => {
.ignore('session', 'sessions')
.expect({
transaction: {
transaction: 'GET /',
transaction: 'GET /\\/test\\/regex/',
transaction_info: {
source: 'route',
},
Expand All @@ -77,13 +77,13 @@ describe('express tracing experimental', () => {
});

test.each([['array1'], ['array5']])(
'should set a correct transaction name for routes consisting of arrays of routes',
'should set a correct transaction name for routes consisting of arrays of routes for %p',
((segment: string, done: () => void) => {
createRunner(__dirname, 'server.js')
.ignore('session', 'sessions')
.expect({
transaction: {
transaction: 'GET /',
transaction: 'GET /test/array1,/\\/test\\/array[2-9]/',
transaction_info: {
source: 'route',
},
Expand Down Expand Up @@ -115,12 +115,12 @@ describe('express tracing experimental', () => {
['arr55/required/lastParam'],
['arr/requiredPath/optionalPath/'],
['arr/requiredPath/optionalPath/lastParam'],
])('should handle more complex regexes in route arrays correctly', ((segment: string, done: () => void) => {
])('should handle more complex regexes in route arrays correctly for %p', ((segment: string, done: () => void) => {
createRunner(__dirname, 'server.js')
.ignore('session', 'sessions')
.expect({
transaction: {
transaction: 'GET /',
transaction: 'GET /test/arr/:id,/\\/test\\/arr[0-9]*\\/required(path)?(\\/optionalPath)?\\/(lastParam)?/',
transaction_info: {
source: 'route',
},
Expand Down

0 comments on commit 2924ab2

Please sign in to comment.