Skip to content

Commit

Permalink
Merge pull request #9902 from hicommonwealth/ci_fixes_for_release
Browse files Browse the repository at this point in the history
fix: update reaction deletion logic and improve test assertions
  • Loading branch information
ilijabojanovic authored Nov 14, 2024
2 parents 33662b6 + 6c0bbb5 commit 6b07853
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,7 @@ const useDeleteCommentReactionMutation = ({
if (comment.id === commentId) {
return {
...comment,
reactions: comment.reactions.filter(
(r) => r.id !== deleted.reaction_id,
),
reactions: comment.reactions.filter((r) => r.id !== deleted.id),
};
}
return comment;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ describe('createReaction Integration Tests', () => {
userJWT,
userAddress,
);
chai.assert.equal(deleteReactionResponse.reaction_id, reactionId);
chai.assert.isTrue(deleteReactionResponse);

await comment!.reload();
chai.assert.equal(comment!.reaction_count, beforeReactionCount);
Expand Down Expand Up @@ -184,7 +184,7 @@ describe('createReaction Integration Tests', () => {
userAddress,
);

chai.assert.equal(deleteReactionResponse.reaction_id, reactionId);
chai.assert.isTrue(deleteReactionResponse);

await thread!.reload();
chai.assert.equal(thread!.reaction_count, beforeReactionCount!);
Expand Down

0 comments on commit 6b07853

Please sign in to comment.