File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -49,11 +49,11 @@ describe(
4949 it ( 'should have correct properties' , ( ) => {
5050 try {
5151 assert ( false , 'test message' )
52- } catch ( e : any ) {
52+ } catch ( e ) {
5353 expect ( e instanceof assert . AssertionError ) . toBe ( true )
5454 expect ( e instanceof Error ) . toBe ( true )
55- expect ( e . name ) . toBe ( 'AssertionError' )
56- expect ( e . message ) . toBeTruthy ( )
55+ expect ( ( e as Error ) . name ) . toBe ( 'AssertionError' )
56+ expect ( ( e as Error ) . message ) . toBeTruthy ( )
5757 }
5858 } )
5959 } )
@@ -364,7 +364,7 @@ describe(
364364 ( ) => {
365365 throw new Error ( 'test' )
366366 } ,
367- ( err : any ) => err instanceof Error ,
367+ ( err : unknown ) => err instanceof Error ,
368368 ) ,
369369 ) . not . toThrow ( )
370370 } )
@@ -430,8 +430,8 @@ describe(
430430 if ( assert . fail ) {
431431 try {
432432 assert . fail ( 'custom message' )
433- } catch ( e : any ) {
434- expect ( e . message ) . toContain ( 'custom' )
433+ } catch ( e ) {
434+ expect ( ( e as Error ) . message ) . toContain ( 'custom' )
435435 }
436436 }
437437 } )
You can’t perform that action at this time.
0 commit comments