@@ -25,6 +25,7 @@ jest.mock('@sentry/utils', () => {
2525 ...actual ,
2626 addInstrumentationHandler : ( { callback, type } : any ) : void => {
2727 if ( type === 'history' ) {
28+ // rather than actually add the navigation-change handler, grab a reference to it, so we can trigger it manually
2829 mockChangeHistory = callback ;
2930 }
3031 } ,
@@ -64,17 +65,17 @@ describe('BrowserTracing', () => {
6465 } ) ;
6566
6667 function createBrowserTracing ( setup ?: boolean , _options ?: Partial < BrowserTracingOptions > ) : BrowserTracing {
67- const inst = new BrowserTracing ( _options ) ;
68+ const instance = new BrowserTracing ( _options ) ;
6869 if ( setup ) {
6970 const processor = ( ) => undefined ;
70- inst . setupOnce ( processor , ( ) => hub ) ;
71+ instance . setupOnce ( processor , ( ) => hub ) ;
7172 }
7273
73- return inst ;
74+ return instance ;
7475 }
7576
7677 // These are important enough to check with a test as incorrect defaults could
77- // break a lot of users configurations.
78+ // break a lot of users' configurations.
7879 it ( 'is created with default settings' , ( ) => {
7980 const browserTracing = createBrowserTracing ( ) ;
8081
@@ -126,7 +127,7 @@ describe('BrowserTracing', () => {
126127 } ) ;
127128
128129 describe ( 'tracingOrigins' , ( ) => {
129- it ( 'warns and uses default tracing origins if non are provided' , ( ) => {
130+ it ( 'warns and uses default tracing origins if none are provided' , ( ) => {
130131 const inst = createBrowserTracing ( true , {
131132 routingInstrumentation : customRoutingInstrumentation ,
132133 } ) ;
0 commit comments