@@ -157,7 +157,7 @@ describe('RoktManager', () => {
157157
158158 expect ( result ) . toEqual ( { } ) ;
159159 expect ( mockMPInstance . Logger . error ) . toHaveBeenCalledWith (
160- expect . stringContaining ( 'Failed to hash " ' )
160+ expect . stringContaining ( 'Failed to hashAttributes, returning an empty object: Hashing failed ' )
161161 ) ;
162162 } ) ;
163163 } ) ;
@@ -207,14 +207,14 @@ describe('RoktManager', () => {
207207 const result = await roktManager . hashSha256 ( null ) ;
208208
209209 expect ( result ) . toBeNull ( ) ;
210- expect ( mockMPInstance . Logger . warning ) . toHaveBeenCalledWith ( 'hashSha256 received null as input' ) ;
210+ expect ( mockMPInstance . Logger . warning ) . toHaveBeenCalledWith ( 'hashSha256 received null/undefined as input' ) ;
211211 } ) ;
212212
213213 it ( 'should return undefined and log warning when value is undefined' , async ( ) => {
214214 const result = await roktManager . hashSha256 ( undefined ) ;
215215
216216 expect ( result ) . toBeUndefined ( ) ;
217- expect ( mockMPInstance . Logger . warning ) . toHaveBeenCalledWith ( 'hashSha256 received undefined as input' ) ;
217+ expect ( mockMPInstance . Logger . warning ) . toHaveBeenCalledWith ( 'hashSha256 received null/ undefined as input' ) ;
218218 } ) ;
219219
220220 it ( 'should return undefined and log error when hashing fails' , async ( ) => {
@@ -224,7 +224,7 @@ describe('RoktManager', () => {
224224
225225 expect ( result ) . toBeUndefined ( ) ;
226226 expect ( mockMPInstance . Logger . error ) . toHaveBeenCalledWith (
227- expect . stringContaining ( 'Failed to hash "[email protected] " and returning undefined' ) 227+ expect . stringContaining ( 'Failed to hashSha256 and returning undefined: Hash failed ' )
228228 ) ;
229229 } ) ;
230230
0 commit comments