@@ -408,26 +408,26 @@ describe("Misc Utils", () => {
408408 describe ( "omit()" , ( ) => {
409409 it ( "should omit a single key" , ( ) => {
410410 const input = { a : 1 , b : 2 , c : 3 } ;
411- const result = Misc . omit ( input , "b" ) ;
411+ const result = Misc . omit ( input , [ "b" ] ) ;
412412 expect ( result ) . toEqual ( { a : 1 , c : 3 } ) ;
413413 } ) ;
414414
415415 it ( "should omit multiple keys" , ( ) => {
416416 const input = { a : 1 , b : 2 , c : 3 , d : 4 } ;
417- const result = Misc . omit ( input , "a" , "d" ) ;
417+ const result = Misc . omit ( input , [ "a" , "d" ] ) ;
418418 expect ( result ) . toEqual ( { b : 2 , c : 3 } ) ;
419419 } ) ;
420420
421421 it ( "should return the same object if no keys are omitted" , ( ) => {
422422 const input = { x : 1 , y : 2 } ;
423- const result = Misc . omit ( input ) ;
423+ const result = Misc . omit ( input , [ ] ) ;
424424 expect ( result ) . toEqual ( { x : 1 , y : 2 } ) ;
425425 } ) ;
426426
427427 it ( "should not mutate the original object" , ( ) => {
428428 const input = { foo : "bar" , baz : "qux" } ;
429429 const copy = { ...input } ;
430- Misc . omit ( input , "baz" ) ;
430+ Misc . omit ( input , [ "baz" ] ) ;
431431 expect ( input ) . toEqual ( copy ) ;
432432 } ) ;
433433
@@ -445,7 +445,7 @@ describe("Misc Utils", () => {
445445 obj : { x : 1 } ,
446446 arr : [ 1 , 2 , 3 ] ,
447447 } ;
448- const result = Misc . omit ( input , "bool" , "arr" ) ;
448+ const result = Misc . omit ( input , [ "bool" , "arr" ] ) ;
449449 expect ( result ) . toEqual ( {
450450 str : "hello" ,
451451 num : 123 ,
0 commit comments