Skip to content

Commit

Permalink
update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
janmonschke committed Apr 2, 2024
1 parent a667c43 commit ba63ef2
Showing 1 changed file with 3 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,7 @@ describe('Body', () => {
eventId: '1',
id: 'timeline-test',
noteId: expect.anything(),
pinEvent: true,
},
type: timelineActions.addNoteToEvent({
eventId: '1',
Expand All @@ -366,13 +367,6 @@ describe('Body', () => {
}).type,
})
);
expect(mockDispatch).toHaveBeenNthCalledWith(
3,
timelineActions.pinEvent({
eventId: '1',
id: 'timeline-test',
})
);
});

test('Add two notes to an event', async () => {
Expand All @@ -385,7 +379,7 @@ describe('Body', () => {
[TimelineId.test]: {
...mockGlobalState.timeline.timelineById[TimelineId.test],
id: 'timeline-test',
pinnedEventIds: { 1: true }, // we should NOT dispatch a pin event, because it's already pinned
pinnedEventIds: { 1: true },
},
},
},
Expand All @@ -407,6 +401,7 @@ describe('Body', () => {
eventId: '1',
id: 'timeline-test',
noteId: expect.anything(),
pinEvent: false,
},
type: timelineActions.addNoteToEvent({
eventId: '1',
Expand All @@ -415,13 +410,6 @@ describe('Body', () => {
}).type,
})
);

expect(mockDispatch).not.toHaveBeenCalledWith(
timelineActions.pinEvent({
eventId: '1',
id: 'timeline-test',
})
);
});
});

Expand Down

0 comments on commit ba63ef2

Please sign in to comment.