Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I think that, while this might work, the approach to managing state and writing the tests is not ideal. For one, your tests should be fast (ie you should be able to rerun them with almost 0 time penalty and see the results instantly). Second, if it’s easier to stop the flow and look at the state / modify the state than looking at what the state should be via the test setup it’s possible that the abstractions you’re using are not quite right and/or the code is tightly coupled.


> I think that, while this might work, the approach to managing state and writing the tests is not ideal.

I strive to not manage state but to write purely functional code, it makes life so much easier - see your second point as an example :)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: