mirror of
https://github.com/urbit/shrub.git
synced 2024-11-28 13:54:20 +03:00
8910e12f67
This shaves off 1000 lines of testing code while maintaining the same tests. It reduces boilerplate by introducing "mare", a monad for testing Eyre. It's very simple (just maintains the current state of Eyre and the current time), but it's easier to build helper functions in this form, and that reduces the immense quantities of copy-and-paste that were in the old tests. What's there now could surely be improved further, but I think this is a good start. The underlying mare machinery is not really specific to Eyre, so it would be straightforward to apply this strategy to other vanes. The work is in creating appropriate helper functions for each vane. Eyre is undergoing work, so that's the only one I've changed here. Further, it's not clear that this is the ultimate solution to unit testing vanes. The resulting code is IMO clearer than before, but I wouldn't say it's *clear*. |
||
---|---|---|
.. | ||
arvo | ||
hoon | ||
vane | ||
zuse | ||
fine.hoon | ||
grq.hoon | ||
nock.hoon |