Skip to content

Commit 1ad7524

Browse files
committed
test addons merhing
1 parent 68166d0 commit 1ad7524

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

test/utils/merge.test.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)