react-spreadsheet icon indicating copy to clipboard operation
react-spreadsheet copied to clipboard

Test Components

Open iddan opened this issue 4 years ago • 3 comments

  • [x] Row
  • [x] Cell
    • [x] Component
    • [x] enhance
  • [x] DataViewer
  • [x] DataEditor
  • [x] ActiveCell - Requires State Context
  • [x] Copied - Requires State Context
  • [x] Selected - Requires State Context
  • [ ] Spreadsheet - In Progress

iddan avatar Sep 08 '21 15:09 iddan

Now that the simple components are tested I’m unsure how to continue. On one hand, the use of unistore is temporary and I would really rather to maintain as little code as possible relating to it. On the other hand: React Context Selectors, which I planned that will replace unistore, are not arriving any time soon and they will be restricted to React 18 anyway. So I see two options:

  • Migrate the code base to a modern, standard and stable state managers (Recoil and Redux come first to my mind)
  • Test the code as is with unistore

iddan avatar Sep 11 '21 22:09 iddan

Another good option may be using useContextSelector which seems to introduce the least amount of new concepts.

iddan avatar Sep 11 '21 23:09 iddan

With #165 useContextSelector is now used for state sharing between components. Now, components are more easily testable.

iddan avatar Sep 20 '21 19:09 iddan

Hello @iddan, can I work on this ?

govind15496 avatar Jan 10 '23 03:01 govind15496

Hey @govind15496 I would love that!

iddan avatar Jan 10 '23 13:01 iddan

can you explain problem little bit more @iddan ?

govind15496 avatar Jan 10 '23 14:01 govind15496

We aim to have unit tests for each component. Currently, all the small components have simple tests. But the spreadsheet is still lacking some tests. You can run the tests and see the coverage to understand which parts are still lacking tests.

iddan avatar Jan 15 '23 11:01 iddan