nuclear icon indicating copy to clipboard operation
nuclear copied to clipboard

#1367: Added Recent Artists Pie Chart to ListeningHistory

Open alicemmartinez opened this issue 1 year ago • 1 comments

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?

alicemmartinez avatar Apr 26 '24 18:04 alicemmartinez

  • You can try moving this component to the ui package, 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 app package, in the ListeningHistoryView component, and fed data from there. No need IMO to write any additional tests there. Just update existing snapshots (jest -u).

nukeop avatar Apr 26 '24 22:04 nukeop