Skip to content

Commit 52e161d

Browse files
committed
s/customRoutingInstrumentation/customInstrumentRouting
1 parent 4cd5530 commit 52e161d

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

packages/tracing/test/browser/browsertracing.test.ts

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -92,17 +92,17 @@ describe('BrowserTracing', () => {
9292

9393
/**
9494
* All of these tests under `describe('route transaction')` are tested with
95-
* `browserTracing.options = { routingInstrumentation: customRoutingInstrumentation }`,
95+
* `browserTracing.options = { routingInstrumentation: customInstrumentRouting }`,
9696
* so that we can show this functionality works independent of the default routing integration.
9797
*/
9898
describe('route transaction', () => {
99-
const customRoutingInstrumentation = (customStartTransaction: (obj: any) => void) => {
99+
const customInstrumentRouting = (customStartTransaction: (obj: any) => void) => {
100100
customStartTransaction({ name: 'a/path', op: 'pageload' });
101101
};
102102

103103
it('calls custom routing instrumenation', () => {
104104
createBrowserTracing(true, {
105-
routingInstrumentation: customRoutingInstrumentation,
105+
routingInstrumentation: customInstrumentRouting,
106106
});
107107

108108
const transaction = getActiveTransaction(hub) as IdleTransaction;
@@ -113,7 +113,7 @@ describe('BrowserTracing', () => {
113113

114114
it('trims all transactions', () => {
115115
createBrowserTracing(true, {
116-
routingInstrumentation: customRoutingInstrumentation,
116+
routingInstrumentation: customInstrumentRouting,
117117
});
118118

119119
const transaction = getActiveTransaction(hub) as IdleTransaction;
@@ -129,7 +129,7 @@ describe('BrowserTracing', () => {
129129
describe('tracingOrigins', () => {
130130
it('warns and uses default tracing origins if none are provided', () => {
131131
const inst = createBrowserTracing(true, {
132-
routingInstrumentation: customRoutingInstrumentation,
132+
routingInstrumentation: customInstrumentRouting,
133133
});
134134

135135
expect(warnSpy).toHaveBeenCalledTimes(2);
@@ -138,7 +138,7 @@ describe('BrowserTracing', () => {
138138

139139
it('warns and uses default tracing origins if empty array given', () => {
140140
const inst = createBrowserTracing(true, {
141-
routingInstrumentation: customRoutingInstrumentation,
141+
routingInstrumentation: customInstrumentRouting,
142142
tracingOrigins: [],
143143
});
144144

@@ -148,7 +148,7 @@ describe('BrowserTracing', () => {
148148

149149
it('warns and uses default tracing origins if tracing origins are not defined', () => {
150150
const inst = createBrowserTracing(true, {
151-
routingInstrumentation: customRoutingInstrumentation,
151+
routingInstrumentation: customInstrumentRouting,
152152
tracingOrigins: undefined,
153153
});
154154

@@ -158,7 +158,7 @@ describe('BrowserTracing', () => {
158158

159159
it('sets tracing origins if provided and does not warn', () => {
160160
const inst = createBrowserTracing(true, {
161-
routingInstrumentation: customRoutingInstrumentation,
161+
routingInstrumentation: customInstrumentRouting,
162162
tracingOrigins: ['something'],
163163
});
164164

@@ -172,7 +172,7 @@ describe('BrowserTracing', () => {
172172
const mockBeforeNavigation = jest.fn().mockReturnValue({ name: 'here/is/my/path' });
173173
createBrowserTracing(true, {
174174
beforeNavigate: mockBeforeNavigation,
175-
routingInstrumentation: customRoutingInstrumentation,
175+
routingInstrumentation: customInstrumentRouting,
176176
});
177177
const transaction = getActiveTransaction(hub) as IdleTransaction;
178178
expect(transaction).toBeDefined();
@@ -184,7 +184,7 @@ describe('BrowserTracing', () => {
184184
const mockBeforeNavigation = jest.fn().mockReturnValue(undefined);
185185
createBrowserTracing(true, {
186186
beforeNavigate: mockBeforeNavigation,
187-
routingInstrumentation: customRoutingInstrumentation,
187+
routingInstrumentation: customInstrumentRouting,
188188
});
189189
const transaction = getActiveTransaction(hub) as IdleTransaction;
190190
expect(transaction.sampled).toBe(false);
@@ -199,7 +199,7 @@ describe('BrowserTracing', () => {
199199
}));
200200
createBrowserTracing(true, {
201201
beforeNavigate: mockBeforeNavigation,
202-
routingInstrumentation: customRoutingInstrumentation,
202+
routingInstrumentation: customInstrumentRouting,
203203
});
204204
const transaction = getActiveTransaction(hub) as IdleTransaction;
205205
expect(transaction).toBeDefined();
@@ -215,7 +215,7 @@ describe('BrowserTracing', () => {
215215
document.head.innerHTML = `<meta name="${name}" content="${content}">`;
216216
const startIdleTransaction = jest.spyOn(hubExtensions, 'startIdleTransaction');
217217

218-
createBrowserTracing(true, { routingInstrumentation: customRoutingInstrumentation });
218+
createBrowserTracing(true, { routingInstrumentation: customInstrumentRouting });
219219

220220
expect(startIdleTransaction).toHaveBeenCalledWith(
221221
expect.any(Object),
@@ -232,7 +232,7 @@ describe('BrowserTracing', () => {
232232

233233
describe('idleTimeout', () => {
234234
it('is created by default', () => {
235-
createBrowserTracing(true, { routingInstrumentation: customRoutingInstrumentation });
235+
createBrowserTracing(true, { routingInstrumentation: customInstrumentRouting });
236236
const mockFinish = jest.fn();
237237
const transaction = getActiveTransaction(hub) as IdleTransaction;
238238
transaction.finish = mockFinish;
@@ -246,7 +246,7 @@ describe('BrowserTracing', () => {
246246
});
247247

248248
it('can be a custom value', () => {
249-
createBrowserTracing(true, { idleTimeout: 2000, routingInstrumentation: customRoutingInstrumentation });
249+
createBrowserTracing(true, { idleTimeout: 2000, routingInstrumentation: customInstrumentRouting });
250250
const mockFinish = jest.fn();
251251
const transaction = getActiveTransaction(hub) as IdleTransaction;
252252
transaction.finish = mockFinish;
@@ -262,7 +262,7 @@ describe('BrowserTracing', () => {
262262

263263
describe('maxTransactionDuration', () => {
264264
it('cancels a transaction if exceeded', () => {
265-
createBrowserTracing(true, { routingInstrumentation: customRoutingInstrumentation });
265+
createBrowserTracing(true, { routingInstrumentation: customInstrumentRouting });
266266
const transaction = getActiveTransaction(hub) as IdleTransaction;
267267
transaction.finish(transaction.startTimestamp + secToMs(DEFAULT_MAX_TRANSACTION_DURATION_SECONDS) + 1);
268268

@@ -271,7 +271,7 @@ describe('BrowserTracing', () => {
271271
});
272272

273273
it('does not cancel a transaction if not exceeded', () => {
274-
createBrowserTracing(true, { routingInstrumentation: customRoutingInstrumentation });
274+
createBrowserTracing(true, { routingInstrumentation: customInstrumentRouting });
275275
const transaction = getActiveTransaction(hub) as IdleTransaction;
276276
transaction.finish(transaction.startTimestamp + secToMs(DEFAULT_MAX_TRANSACTION_DURATION_SECONDS));
277277

@@ -285,7 +285,7 @@ describe('BrowserTracing', () => {
285285
expect(DEFAULT_MAX_TRANSACTION_DURATION_SECONDS < customMaxTransactionDuration).toBe(true);
286286
createBrowserTracing(true, {
287287
maxTransactionDuration: customMaxTransactionDuration,
288-
routingInstrumentation: customRoutingInstrumentation,
288+
routingInstrumentation: customInstrumentRouting,
289289
});
290290
const transaction = getActiveTransaction(hub) as IdleTransaction;
291291

0 commit comments

Comments
 (0)