@@ -149,17 +149,17 @@ describe("updateValueAtPath", () => {
149149 } ) ;
150150
151151 test ( "initializes an empty object when input is null/undefined and path starts with a string" , ( ) => {
152- expect ( updateValueAtPath ( null as any , [ "foo" ] , "bar" ) ) . toEqual ( {
152+ expect ( updateValueAtPath ( null , [ "foo" ] , "bar" ) ) . toEqual ( {
153153 foo : "bar" ,
154154 } ) ;
155- expect ( updateValueAtPath ( undefined as any , [ "foo" ] , "bar" ) ) . toEqual ( {
155+ expect ( updateValueAtPath ( undefined , [ "foo" ] , "bar" ) ) . toEqual ( {
156156 foo : "bar" ,
157157 } ) ;
158158 } ) ;
159159
160160 test ( "initializes an empty array when input is null/undefined and path starts with a number" , ( ) => {
161- expect ( updateValueAtPath ( null as any , [ "0" ] , "bar" ) ) . toEqual ( [ "bar" ] ) ;
162- expect ( updateValueAtPath ( undefined as any , [ "0" ] , "bar" ) ) . toEqual ( [ "bar" ] ) ;
161+ expect ( updateValueAtPath ( null , [ "0" ] , "bar" ) ) . toEqual ( [ "bar" ] ) ;
162+ expect ( updateValueAtPath ( undefined , [ "0" ] , "bar" ) ) . toEqual ( [ "bar" ] ) ;
163163 } ) ;
164164
165165 // Object update tests
@@ -293,10 +293,8 @@ describe("getValueAtPath", () => {
293293 } ) ;
294294
295295 test ( "returns default value when input is null/undefined" , ( ) => {
296- expect ( getValueAtPath ( null as any , [ "foo" ] , "default" ) ) . toBe ( "default" ) ;
297- expect ( getValueAtPath ( undefined as any , [ "foo" ] , "default" ) ) . toBe (
298- "default" ,
299- ) ;
296+ expect ( getValueAtPath ( null , [ "foo" ] , "default" ) ) . toBe ( "default" ) ;
297+ expect ( getValueAtPath ( undefined , [ "foo" ] , "default" ) ) . toBe ( "default" ) ;
300298 } ) ;
301299
302300 test ( "handles array indices correctly" , ( ) => {
0 commit comments