Skip to content

Commit ff67dc7

Browse files
committed
fixes
1 parent a507bb9 commit ff67dc7

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

src/resolvers/event.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,17 @@ module.exports = {
2020
Event: {
2121

2222
/**
23-
* Returns repetitions list of the event
23+
* Returns repetitions portion of the event
2424
*
2525
* @param {ResolverObj} _obj
2626
* @param {String} eventId
2727
* @param {String} projectId
2828
* @param {Number} limit
2929
* @param {Number} cursor
3030
*
31-
* @return {EventRepetitionSchema[]}
31+
* @return {RepetitionsPortion}
3232
*/
33-
async repetitions({ _id: eventId, projectId }, { limit, cursor }) {
33+
async repetitionsPortion({ _id: eventId, projectId }, { limit, cursor }) {
3434
const factory = new EventsFactory(projectId);
3535

3636
return factory.getEventRepetitions(eventId, limit, cursor);

test/utils/merge.test.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,12 @@ describe('composeEventPayloadWithRepetition', () => {
175175
});
176176

177177
it('should handle null values in repetition payload', () => {
178+
const originalEventPayload = {
179+
title: 'Original message',
180+
type: 'error',
181+
addons: JSON.stringify({ userId: 123 }),
182+
context: JSON.stringify({ sessionId: 'abc' }),
183+
};
178184
/**
179185
* Arrange
180186
*/
@@ -191,7 +197,7 @@ describe('composeEventPayloadWithRepetition', () => {
191197
/**
192198
* Act
193199
*/
194-
const result = composeEventPayloadWithRepetition(mockOriginalEvent.payload, repetition);
200+
const result = composeEventPayloadWithRepetition(originalEventPayload, repetition);
195201

196202
/**
197203
* Assert

0 commit comments

Comments
 (0)