Test Components
- [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
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:
Another good option may be using useContextSelector which seems to introduce the least amount of new concepts.
With #165 useContextSelector is now used for state sharing between components. Now, components are more easily testable.
Hello @iddan, can I work on this ?
Hey @govind15496 I would love that!
can you explain problem little bit more @iddan ?
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.