nuclear
nuclear copied to clipboard
#1367: Added Recent Artists Pie Chart to ListeningHistory
Have not written test cases, or completely implemented filtering algorithm for range of dates. I was hoping you could guide me to where I could write test cases for my added subcomponent?
- You can try moving this component to the
uipackage, and creating a story for it (using storybook). Then we could see what it looks like in various scenarios easily. - In that package, there's an easy setup for snapshot tests (look for a function called
makeSnapshotTest). If the chart is rendered in svg that's all we're going to need. You can also try adding more involved unit tests for any edge cases you can think of. - If you do it that way, then this component can be imported into the
apppackage, in theListeningHistoryViewcomponent, and fed data from there. No need IMO to write any additional tests there. Just update existing snapshots (jest -u).