@@ -49,6 +49,7 @@ describe('sveltekitRoutingInstrumentation', () => {
4949 } ) ;
5050
5151 it ( "starts a pageload transaction when it's called with default params" , ( ) => {
52+ // eslint-disable-next-line deprecation/deprecation
5253 svelteKitRoutingInstrumentation ( mockedStartTransaction ) ;
5354
5455 expect ( mockedStartTransaction ) . toHaveBeenCalledTimes ( 1 ) ;
@@ -66,7 +67,6 @@ describe('sveltekitRoutingInstrumentation', () => {
6667 } ) ;
6768
6869 // We emit an update to the `page` store to simulate the SvelteKit router lifecycle
69- // @ts -expect-error This is fine because we testUtils/stores.ts defines `page` as a writable store
7070 page . set ( { route : { id : 'testRoute' } } ) ;
7171
7272 // This should update the transaction name with the parameterized route:
@@ -76,15 +76,16 @@ describe('sveltekitRoutingInstrumentation', () => {
7676 } ) ;
7777
7878 it ( "doesn't start a pageload transaction if `startTransactionOnPageLoad` is false" , ( ) => {
79+ // eslint-disable-next-line deprecation/deprecation
7980 svelteKitRoutingInstrumentation ( mockedStartTransaction , false ) ;
8081 expect ( mockedStartTransaction ) . toHaveBeenCalledTimes ( 0 ) ;
8182 } ) ;
8283
8384 it ( "doesn't start a navigation transaction when `startTransactionOnLocationChange` is false" , ( ) => {
85+ // eslint-disable-next-line deprecation/deprecation
8486 svelteKitRoutingInstrumentation ( mockedStartTransaction , false , false ) ;
8587
8688 // We emit an update to the `navigating` store to simulate the SvelteKit navigation lifecycle
87- // @ts -expect-error This is fine because we testUtils/stores.ts defines `navigating` as a writable store
8889 navigating . set ( {
8990 from : { route : { id : '/users' } , url : { pathname : '/users' } } ,
9091 to : { route : { id : '/users/[id]' } , url : { pathname : '/users/7762' } } ,
@@ -95,10 +96,10 @@ describe('sveltekitRoutingInstrumentation', () => {
9596 } ) ;
9697
9798 it ( 'starts a navigation transaction when `startTransactionOnLocationChange` is true' , ( ) => {
99+ // eslint-disable-next-line deprecation/deprecation
98100 svelteKitRoutingInstrumentation ( mockedStartTransaction , false , true ) ;
99101
100102 // We emit an update to the `navigating` store to simulate the SvelteKit navigation lifecycle
101- // @ts -expect-error This is fine because we testUtils/stores.ts defines `navigating` as a writable store
102103 navigating . set ( {
103104 from : { route : { id : '/users' } , url : { pathname : '/users' } } ,
104105 to : { route : { id : '/users/[id]' } , url : { pathname : '/users/7762' } } ,
@@ -127,18 +128,17 @@ describe('sveltekitRoutingInstrumentation', () => {
127128 expect ( returnedTransaction ?. setTag ) . toHaveBeenCalledWith ( 'from' , '/users' ) ;
128129
129130 // We emit `null` here to simulate the end of the navigation lifecycle
130- // @ts -expect-error this is fine
131131 navigating . set ( null ) ;
132132
133133 expect ( routingSpanFinishSpy ) . toHaveBeenCalledTimes ( 1 ) ;
134134 } ) ;
135135
136136 describe ( 'handling same origin and destination navigations' , ( ) => {
137137 it ( "doesn't start a navigation transaction if the raw navigation origin and destination are equal" , ( ) => {
138+ // eslint-disable-next-line deprecation/deprecation
138139 svelteKitRoutingInstrumentation ( mockedStartTransaction , false , true ) ;
139140
140141 // We emit an update to the `navigating` store to simulate the SvelteKit navigation lifecycle
141- // @ts -expect-error This is fine because we testUtils/stores.ts defines `navigating` as a writable store
142142 navigating . set ( {
143143 from : { route : { id : '/users/[id]' } , url : { pathname : '/users/7762' } } ,
144144 to : { route : { id : '/users/[id]' } , url : { pathname : '/users/7762' } } ,
@@ -148,9 +148,9 @@ describe('sveltekitRoutingInstrumentation', () => {
148148 } ) ;
149149
150150 it ( 'starts a navigation transaction if the raw navigation origin and destination are not equal' , ( ) => {
151+ // eslint-disable-next-line deprecation/deprecation
151152 svelteKitRoutingInstrumentation ( mockedStartTransaction , false , true ) ;
152153
153- // @ts -expect-error This is fine
154154 navigating . set ( {
155155 from : { route : { id : '/users/[id]' } , url : { pathname : '/users/7762' } } ,
156156 to : { route : { id : '/users/[id]' } , url : { pathname : '/users/223412' } } ,
@@ -179,11 +179,11 @@ describe('sveltekitRoutingInstrumentation', () => {
179179 } ) ;
180180
181181 it ( 'falls back to `window.location.pathname` to determine the raw origin' , ( ) => {
182+ // eslint-disable-next-line deprecation/deprecation
182183 svelteKitRoutingInstrumentation ( mockedStartTransaction , false , true ) ;
183184
184185 // window.location.pathame is "/" in tests
185186
186- // @ts -expect-error This is fine
187187 navigating . set ( {
188188 to : { route : { } , url : { pathname : '/' } } ,
189189 } ) ;
0 commit comments