Closed itaditya closed 5 years ago
I'll work on this one
@itaditya you mind if I move the code to read local storage from ScoreBoard.js to Game.js so that the ScoreBoard component received an array of the values?
The Game.js component has alread gotten pretty big and it is not the responsibility of Game.js to deal with ScoreBoard data. So yeah please keep the logic in ScoreBoard.js only.
If you got stuck in mocking localStorage or something let me know
Currently the user flow
Showing list of scores (fetched from localStorage) on game page
is not tested. Using jest and @testing-library/react tests have to be added for this flow.
Tests should go in
src/tests/ScoreBoard.test.js