HomePhabricator
Diffusion Comm 6527cd38b18c

[lib] introduce unit tests for stringForReactionList reaction util function

Description

[lib] introduce unit tests for stringForReactionList reaction util function

Summary:
introduced unit tests for stringForReactionList reaction util function. This was suggested by Atul in D5878. In these tests I tested the case where there are multiple reactions of the same reaction type, mutliple and single reaction of different reactions, no reactions, and a single reaction for one reaction type, as well as when the viewer has reacted.


Depends on D5878

Test Plan:
Ran yarn test reaction-utils.test.js` in lib directory and all the tests pass as expected

Screenshot 2022-12-20 at 12.12.29 PM.png (516×2 px, 464 KB)

Reviewers: atul, tomek

Reviewed By: atul, tomek

Subscribers: ashoat, tomek, atul

Differential Revision: https://phab.comm.dev/D5953

Details