@@ -54,6 +54,8 @@ describe('composeEventPayloadByRepetition', () => {
5454 ...mockOriginalEvent . payload ,
5555 title : 'Updated message' ,
5656 type : 'warning' ,
57+ addons : JSON . stringify ( { userId : 8888 } ) ,
58+ context : JSON . stringify ( { sessionId : 'qwery' } ) ,
5759 } ,
5860 } ) ;
5961
@@ -74,8 +76,8 @@ describe('composeEventPayloadByRepetition', () => {
7476 expect ( result ) . toEqual ( {
7577 title : 'Updated message' ,
7678 type : 'warning' ,
77- addons : JSON . stringify ( { userId : 123 } ) ,
78- context : JSON . stringify ( { sessionId : 'abc ' } ) ,
79+ addons : JSON . stringify ( { userId : 8888 } ) ,
80+ context : JSON . stringify ( { sessionId : 'qwery ' } ) ,
7981 } ) ;
8082 } ) ;
8183
@@ -259,7 +261,7 @@ describe('composeEventPayloadByRepetition', () => {
259261 * Assert
260262 */
261263 expect ( result ) . toEqual ( {
262- title : 'Original message' , // null в repetition должно сохранить оригинальное значение
264+ title : 'Original message' ,
263265 type : 'info' ,
264266 addons : JSON . stringify ( { userId : 123 } ) ,
265267 context : JSON . stringify ( { sessionId : 'abc' } ) ,
@@ -388,7 +390,7 @@ describe('composeEventPayloadByRepetition', () => {
388390 */
389391 expect ( ( ) => {
390392 composeEventPayloadByRepetition ( eventWithInvalidJSON . payload , repetition ) ;
391- } ) . toThrow ( ) ; // Должно выбросить ошибку при парсинге невалидного JSON
393+ } ) . toThrow ( ) ;
392394 } ) ;
393395 } ) ;
394396} ) ;
0 commit comments