You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Module B defines fixture G in terms of F's current value, making G depend on F
Test T declares that it uses fixture G
Both fixtures F and G are initialized within test T
The current alternative would be to bundle the disposable underlying F with a function producing the disposable for G using disposable-chain, then providing a "compound fixture" F2+G and convenience function to get the current values of F2 and G out of the compound value. But this means that if a test uses F, and another test inside that test uses G, two instances of F will be created. Furthermore, an extra F will be created for every single fixture built on top of F.
A hidden global parameter in the fixture library that maps gensyms stored in fixtures to current values could be used to implement some sort of automatic fixture dependency system. Or maybe a fixture could wrap a function producing a disposable plus dependency fixtures? Or something.
The text was updated successfully, but these errors were encountered:
The current alternative would be to bundle the disposable underlying F with a function producing the disposable for G using
disposable-chain
, then providing a "compound fixture" F2+G and convenience function to get the current values of F2 and G out of the compound value. But this means that if a test uses F, and another test inside that test uses G, two instances of F will be created. Furthermore, an extra F will be created for every single fixture built on top of F.A hidden global parameter in the fixture library that maps gensyms stored in fixtures to current values could be used to implement some sort of automatic fixture dependency system. Or maybe a fixture could wrap a function producing a disposable plus dependency fixtures? Or something.
The text was updated successfully, but these errors were encountered: