flatironinstitute / mcmc-monitor

Monitor MCMC runs in the browser
Other
35 stars 0 forks source link

Add tests for custom utility hooks. Models for same w/ React-Testing-Library. #84

Closed jsoules closed 1 year ago

magland commented 1 year ago

Looks good to me.

One possible concern with these tests is that it might make it more difficult to refactor things (will need to also update the tests). But I suppose this is just the nature of it.

jsoules commented 1 year ago

Yeah, that is always a concern--balancing testing vs refactoring. I am trying (sometimes with more success than others) to keep the testing to the public contract of the components--react-testing-library in particular is very opinionated about this and makes it quite hard to do anything else--but there will likely be some leakage, and in any event if we change the public behavior, the test will have to change too.

We'll see how it goes.