kasperpihl / react-slice

Single dependency (react) global state. Simplicity 👌 meets performance 🔥
4 stars 0 forks source link

Tests? #6

Closed cenobitedk closed 1 year ago

cenobitedk commented 4 years ago

Should we add tests or what do you think @kasperpihl ?

kasperpihl commented 4 years ago

Yeah I think that's a great idea. Especially the consistency of the hook and static availability would be nice to ensure.

cenobitedk commented 4 years ago

Cool. Any preference in what tool to use? Jasmin seem very lightweight and still pretty fast. Do we need specific react test?

kasperpihl commented 4 years ago

I think we should test React render specific stuff like if it re-renders correctly with the hook. I like jest with react testing library, as it's the most common in the react community. But I'm good with Jasmin as well if you prefer that. 🙌

cenobitedk commented 4 years ago

I have used jasmine, mainly because I read this article where it performs very well. https://medium.com/dailyjs/javascript-test-runners-benchmark-3a78d4117b4

Maybe I'm just opinionated but jest seem like the slow dinosaur. I could be very wrong.

kasperpihl commented 4 years ago

Interesting, well just go with the one that excites you. After all, having tests is better than no tests :)