@@ -154,7 +154,7 @@ describe('Profiler', () => {
154154 tooltipText : 'Test marker' ,
155155 properties : [ [ 'key' , 'value' ] ] ,
156156 } ) ;
157- } ) . not . toThrowError ( ) ;
157+ } ) . not . toThrow ( ) ;
158158
159159 const marks = performance . getEntriesByType ( 'mark' ) ;
160160 expect ( marks ) . toStrictEqual ( [
@@ -181,7 +181,7 @@ describe('Profiler', () => {
181181 profilerWithColor . marker ( 'test-marker-default-color' , {
182182 tooltipText : 'Test marker with default color' ,
183183 } ) ;
184- } ) . not . toThrowError ( ) ;
184+ } ) . not . toThrow ( ) ;
185185
186186 const marks = performance . getEntriesByType ( 'mark' ) ;
187187 expect ( marks ) . toStrictEqual ( [
@@ -207,7 +207,7 @@ describe('Profiler', () => {
207207 tooltipText : 'Test marker without default color' ,
208208 properties : [ [ 'key' , 'value' ] ] ,
209209 } ) ;
210- } ) . not . toThrowError ( ) ;
210+ } ) . not . toThrow ( ) ;
211211
212212 const marks = performance . getEntriesByType ( 'mark' ) ;
213213 expect ( marks ) . toStrictEqual ( [
@@ -233,7 +233,7 @@ describe('Profiler', () => {
233233 color : 'primary' ,
234234 tooltipText : 'This should not create a mark' ,
235235 } ) ;
236- } ) . not . toThrowError ( ) ;
236+ } ) . not . toThrow ( ) ;
237237
238238 const marks = performance . getEntriesByType ( 'mark' ) ;
239239 expect ( marks ) . toHaveLength ( 0 ) ;
@@ -304,7 +304,7 @@ describe('Profiler', () => {
304304 throw error ;
305305 } ) ;
306306
307- expect ( ( ) => profiler . measure ( 'test-event' , workFn ) ) . toThrowError ( error ) ;
307+ expect ( ( ) => profiler . measure ( 'test-event' , workFn ) ) . toThrow ( error ) ;
308308 expect ( workFn ) . toHaveBeenCalled ( ) ;
309309 } ) ;
310310
@@ -314,7 +314,7 @@ describe('Profiler', () => {
314314 throw error ;
315315 } ) ;
316316
317- expect ( ( ) => profiler . measure ( 'test-event' , workFn ) ) . toThrowError ( error ) ;
317+ expect ( ( ) => profiler . measure ( 'test-event' , workFn ) ) . toThrow ( error ) ;
318318 expect ( workFn ) . toHaveBeenCalled ( ) ;
319319 } ) ;
320320
@@ -325,9 +325,9 @@ describe('Profiler', () => {
325325 throw error ;
326326 } ) ;
327327
328- expect ( ( ) =>
329- enabledProfiler . measure ( 'test-event- error' , workFn ) ,
330- ) . toThrowError ( error ) ;
328+ expect ( ( ) => enabledProfiler . measure ( 'test-event-error' , workFn ) ) . toThrow (
329+ error ,
330+ ) ;
331331 expect ( workFn ) . toHaveBeenCalled ( ) ;
332332
333333 // Verify that performance marks were created even though error occurred
@@ -424,7 +424,7 @@ describe('Profiler', () => {
424424
425425 await expect (
426426 profiler . measureAsync ( 'test-async-event' , workFn ) ,
427- ) . rejects . toThrowError ( error ) ;
427+ ) . rejects . toThrow ( error ) ;
428428 expect ( workFn ) . toHaveBeenCalled ( ) ;
429429 } ) ;
430430
@@ -438,7 +438,7 @@ describe('Profiler', () => {
438438
439439 await expect (
440440 enabledProfiler . measureAsync ( 'test-async-event-error' , workFn ) ,
441- ) . rejects . toThrowError ( error ) ;
441+ ) . rejects . toThrow ( error ) ;
442442 expect ( workFn ) . toHaveBeenCalled ( ) ;
443443
444444 // Verify that performance marks were created even though error occurred
0 commit comments