Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Added Item and List components tests with snapshots and correct icon image checking #117
I've extended a bit work with respect to tests already in place - issue #68, and added the following:
1. Item component tests
1.1 test that snapshot renders correctly for items with death date in the past (for the ones in the future I'd need to add extra logic to handle the randomized phrase that I did not have time as of yet)
2. List component tests for snapshot and length
I've also added the test data in fixtures that is being used for cases above.
@mlukjanska I am very grateful. Incredible work. Thank you!
The string you highlighted is generated in a component method (below), but it should always remain the same in snapshots since the age of 'dead' products should not change. The phrase is partially generated by date-fns/formatDistance.