Skip to content

Commit ee4514c

Browse files
committed
format
1 parent ef3af92 commit ee4514c

2 files changed

Lines changed: 112 additions & 106 deletions

File tree

dev-packages/e2e-tests/test-applications/react-create-hash-router/tests/transactions.test.ts

Lines changed: 104 additions & 104 deletions
Original file line numberDiff line numberDiff line change
@@ -171,21 +171,21 @@ test('Captures a parameterized path pageload transaction', async ({ page }) => {
171171
const transactionEvent = await transactionEventPromise;
172172

173173
expect(transactionEvent).toMatchObject({
174-
transaction: '/v2/post/:post',
175-
type: 'transaction',
176-
transaction_info: {
177-
source: 'route',
178-
},
179-
contexts: {
180-
trace: {
181-
data: {
182-
'url.template': '/v2/post/:post',
183-
'url.path': '/',
184-
'url.full': 'http://localhost:3030/#/v2/post/1',
185-
},
174+
transaction: '/v2/post/:post',
175+
type: 'transaction',
176+
transaction_info: {
177+
source: 'route',
178+
},
179+
contexts: {
180+
trace: {
181+
data: {
182+
'url.template': '/v2/post/:post',
183+
'url.path': '/',
184+
'url.full': 'http://localhost:3030/#/v2/post/1',
186185
},
187186
},
188-
});
187+
},
188+
});
189189
});
190190

191191
test('Captures a parameterized path pageload transaction for nested route', async ({ page }) => {
@@ -198,21 +198,21 @@ test('Captures a parameterized path pageload transaction for nested route', asyn
198198
const transactionEvent = await transactionEventPromise;
199199

200200
expect(transactionEvent).toMatchObject({
201-
transaction: '/v2/post/:post/featured',
202-
type: 'transaction',
203-
transaction_info: {
204-
source: 'route',
205-
},
206-
contexts: {
207-
trace: {
208-
data: {
209-
'url.template': '/v2/post/:post/featured',
210-
'url.path': '/',
211-
'url.full': 'http://localhost:3030/#/v2/post/1/featured',
212-
},
201+
transaction: '/v2/post/:post/featured',
202+
type: 'transaction',
203+
transaction_info: {
204+
source: 'route',
205+
},
206+
contexts: {
207+
trace: {
208+
data: {
209+
'url.template': '/v2/post/:post/featured',
210+
'url.path': '/',
211+
'url.full': 'http://localhost:3030/#/v2/post/1/featured',
213212
},
214213
},
215-
});
214+
},
215+
});
216216
});
217217

218218
test('Captures a parameterized path pageload transaction for deeply nested route', async ({ page }) => {
@@ -225,21 +225,21 @@ test('Captures a parameterized path pageload transaction for deeply nested route
225225
const transactionEvent = await transactionEventPromise;
226226

227227
expect(transactionEvent).toMatchObject({
228-
transaction: '/v1/post/:post/edit',
229-
type: 'transaction',
230-
transaction_info: {
231-
source: 'route',
232-
},
233-
contexts: {
234-
trace: {
235-
data: {
236-
'url.template': '/v1/post/:post/edit',
237-
'url.path': '/',
238-
'url.full': 'http://localhost:3030/#/v1/post/1/edit',
239-
},
228+
transaction: '/v1/post/:post/edit',
229+
type: 'transaction',
230+
transaction_info: {
231+
source: 'route',
232+
},
233+
contexts: {
234+
trace: {
235+
data: {
236+
'url.template': '/v1/post/:post/edit',
237+
'url.path': '/',
238+
'url.full': 'http://localhost:3030/#/v1/post/1/edit',
240239
},
241240
},
242-
});
241+
},
242+
});
243243
});
244244

245245
test('Captures a parameterized path pageload transaction for nested route with absolute path', async ({ page }) => {
@@ -252,21 +252,21 @@ test('Captures a parameterized path pageload transaction for nested route with a
252252
const transactionEvent = await transactionEventPromise;
253253

254254
expect(transactionEvent).toMatchObject({
255-
transaction: '/v2/post/:post/related',
256-
type: 'transaction',
257-
transaction_info: {
258-
source: 'route',
259-
},
260-
contexts: {
261-
trace: {
262-
data: {
263-
'url.template': '/v2/post/:post/related',
264-
'url.path': '/',
265-
'url.full': 'http://localhost:3030/#/v2/post/1/related',
266-
},
255+
transaction: '/v2/post/:post/related',
256+
type: 'transaction',
257+
transaction_info: {
258+
source: 'route',
259+
},
260+
contexts: {
261+
trace: {
262+
data: {
263+
'url.template': '/v2/post/:post/related',
264+
'url.path': '/',
265+
'url.full': 'http://localhost:3030/#/v2/post/1/related',
267266
},
268267
},
269-
});
268+
},
269+
});
270270
});
271271

272272
test('Captures a parameterized path navigation transaction', async ({ page }) => {
@@ -281,21 +281,21 @@ test('Captures a parameterized path navigation transaction', async ({ page }) =>
281281
const transactionEvent = await transactionEventPromise;
282282

283283
expect(transactionEvent).toMatchObject({
284-
transaction: '/v2/post/:post',
285-
type: 'transaction',
286-
transaction_info: {
287-
source: 'route',
288-
},
289-
contexts: {
290-
trace: {
291-
data: {
292-
'url.template': '/v2/post/:post',
293-
'url.path': '/',
294-
'url.full': 'http://localhost:3030/#/v2/post/1',
295-
},
284+
transaction: '/v2/post/:post',
285+
type: 'transaction',
286+
transaction_info: {
287+
source: 'route',
288+
},
289+
contexts: {
290+
trace: {
291+
data: {
292+
'url.template': '/v2/post/:post',
293+
'url.path': '/',
294+
'url.full': 'http://localhost:3030/#/v2/post/1',
296295
},
297296
},
298-
});
297+
},
298+
});
299299
});
300300

301301
test('Captures a parameterized path navigation transaction for nested route', async ({ page }) => {
@@ -310,21 +310,21 @@ test('Captures a parameterized path navigation transaction for nested route', as
310310
const transactionEvent = await transactionEventPromise;
311311

312312
expect(transactionEvent).toMatchObject({
313-
transaction: '/v2/post/:post/featured',
314-
type: 'transaction',
315-
transaction_info: {
316-
source: 'route',
317-
},
318-
contexts: {
319-
trace: {
320-
data: {
321-
'url.template': '/v2/post/:post/featured',
322-
'url.path': '/',
323-
'url.full': 'http://localhost:3030/#/v2/post/1/featured',
324-
},
313+
transaction: '/v2/post/:post/featured',
314+
type: 'transaction',
315+
transaction_info: {
316+
source: 'route',
317+
},
318+
contexts: {
319+
trace: {
320+
data: {
321+
'url.template': '/v2/post/:post/featured',
322+
'url.path': '/',
323+
'url.full': 'http://localhost:3030/#/v2/post/1/featured',
325324
},
326325
},
327-
});
326+
},
327+
});
328328
});
329329

330330
test('Captures a parameterized path navigation transaction for deeply nested route', async ({ page }) => {
@@ -339,21 +339,21 @@ test('Captures a parameterized path navigation transaction for deeply nested rou
339339
const transactionEvent = await transactionEventPromise;
340340

341341
expect(transactionEvent).toMatchObject({
342-
transaction: '/v1/post/:post/edit',
343-
type: 'transaction',
344-
transaction_info: {
345-
source: 'route',
346-
},
347-
contexts: {
348-
trace: {
349-
data: {
350-
'url.template': '/v1/post/:post/edit',
351-
'url.path': '/',
352-
'url.full': 'http://localhost:3030/#/v1/post/1/edit',
353-
},
342+
transaction: '/v1/post/:post/edit',
343+
type: 'transaction',
344+
transaction_info: {
345+
source: 'route',
346+
},
347+
contexts: {
348+
trace: {
349+
data: {
350+
'url.template': '/v1/post/:post/edit',
351+
'url.path': '/',
352+
'url.full': 'http://localhost:3030/#/v1/post/1/edit',
354353
},
355354
},
356-
});
355+
},
356+
});
357357
});
358358

359359
test('Captures a parameterized path navigation transaction for nested route with absolute path', async ({ page }) => {
@@ -368,21 +368,21 @@ test('Captures a parameterized path navigation transaction for nested route with
368368
const transactionEvent = await transactionEventPromise;
369369

370370
expect(transactionEvent).toMatchObject({
371-
transaction: '/v2/post/:post/related',
372-
type: 'transaction',
373-
transaction_info: {
374-
source: 'route',
375-
},
376-
contexts: {
377-
trace: {
378-
data: {
379-
'url.template': '/v2/post/:post/related',
380-
'url.path': '/',
381-
'url.full': 'http://localhost:3030/#/v2/post/1/related',
382-
},
371+
transaction: '/v2/post/:post/related',
372+
type: 'transaction',
373+
transaction_info: {
374+
source: 'route',
375+
},
376+
contexts: {
377+
trace: {
378+
data: {
379+
'url.template': '/v2/post/:post/related',
380+
'url.path': '/',
381+
'url.full': 'http://localhost:3030/#/v2/post/1/related',
383382
},
384383
},
385-
});
384+
},
385+
});
386386
});
387387

388388
test('Captures a parameterized path pageload transaction for group route', async ({ page }) => {

packages/react/test/reactrouter-descendant-routes.test.tsx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,10 @@ describe('React Router Descendant Routes', () => {
136136
expect(mockStartBrowserTracingPageLoadSpan).toHaveBeenCalledTimes(1);
137137
expect(mockRootSpan.updateName).toHaveBeenLastCalledWith('/projects/:projectId/views/:viewId/:detailId');
138138
expect(mockRootSpan.setAttribute).toHaveBeenCalledWith(SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, 'route');
139-
expect(mockRootSpan.setAttribute).toHaveBeenCalledWith(URL_TEMPLATE, '/projects/:projectId/views/:viewId/:detailId');
139+
expect(mockRootSpan.setAttribute).toHaveBeenCalledWith(
140+
URL_TEMPLATE,
141+
'/projects/:projectId/views/:viewId/:detailId',
142+
);
140143
});
141144

142145
it('works with descendant wildcard routes - navigation', () => {
@@ -325,7 +328,10 @@ describe('React Router Descendant Routes', () => {
325328
expect(mockStartBrowserTracingPageLoadSpan).toHaveBeenCalledTimes(1);
326329
expect(mockRootSpan.updateName).toHaveBeenLastCalledWith('/projects/:projectId/views/:viewId/:detailId');
327330
expect(mockRootSpan.setAttribute).toHaveBeenCalledWith(SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, 'route');
328-
expect(mockRootSpan.setAttribute).toHaveBeenCalledWith(URL_TEMPLATE, '/projects/:projectId/views/:viewId/:detailId');
331+
expect(mockRootSpan.setAttribute).toHaveBeenCalledWith(
332+
URL_TEMPLATE,
333+
'/projects/:projectId/views/:viewId/:detailId',
334+
);
329335
});
330336

331337
it('works with descendant wildcard routes - navigation', () => {

0 commit comments

Comments
 (0)