@@ -2,20 +2,20 @@ import { validateUtmParams } from '../../src/utils/utm/utm';
22
33describe ( 'UTM Utils' , ( ) => {
44 describe ( 'validateUtmParams' , ( ) => {
5- it ( 'should return empty object for undefined or null utm' , ( ) => {
6- expect ( validateUtmParams ( undefined ) ) . toEqual ( { } ) ;
7- expect ( validateUtmParams ( null as any ) ) . toEqual ( { } ) ;
5+ it ( 'should return undefined for undefined or null utm' , ( ) => {
6+ expect ( validateUtmParams ( undefined ) ) . toBeUndefined ( ) ;
7+ expect ( validateUtmParams ( null as any ) ) . toBeUndefined ( ) ;
88 } ) ;
99
1010 it ( 'should return empty object for empty object' , ( ) => {
1111 expect ( validateUtmParams ( { } ) ) . toEqual ( { } ) ;
1212 } ) ;
1313
14- it ( 'should return empty object for non-object types' , ( ) => {
15- expect ( validateUtmParams ( 'string' as any ) ) . toEqual ( { } ) ;
16- expect ( validateUtmParams ( 123 as any ) ) . toEqual ( { } ) ;
17- expect ( validateUtmParams ( true as any ) ) . toEqual ( { } ) ;
18- expect ( validateUtmParams ( [ ] as any ) ) . toEqual ( { } ) ;
14+ it ( 'should return undefined for non-object types' , ( ) => {
15+ expect ( validateUtmParams ( 'string' as any ) ) . toBeUndefined ( ) ;
16+ expect ( validateUtmParams ( 123 as any ) ) . toBeUndefined ( ) ;
17+ expect ( validateUtmParams ( true as any ) ) . toBeUndefined ( ) ;
18+ expect ( validateUtmParams ( [ ] as any ) ) . toBeUndefined ( ) ;
1919 } ) ;
2020
2121 it ( 'should filter out invalid UTM keys' , ( ) => {
0 commit comments