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
Spec instrumentation as implemented by spec itself and orchestra both work by altering the var root to wrap the original function with extra behaviour that checks the spec registry and raises errors.
Because bond also replaces the var when doing stubbing, this instrumentation gets lost.
I think it would be useful if spec instrumentation was maintained during stubbing, to ensure that any stubbed behaviour adheres to the spec of the real implementation.
One suggestion from @ericfode was that rather than teach bond about spec instrumentation, we could teach the instrumentation about bond. Bond itself would then need some fairly generic code to pick up metadata and apply additional transformations after stubbing.
What do people think?
The text was updated successfully, but these errors were encountered:
Spec instrumentation as implemented by spec itself and orchestra both work by altering the var root to wrap the original function with extra behaviour that checks the spec registry and raises errors.
Because bond also replaces the var when doing stubbing, this instrumentation gets lost.
I think it would be useful if spec instrumentation was maintained during stubbing, to ensure that any stubbed behaviour adheres to the spec of the real implementation.
One suggestion from @ericfode was that rather than teach bond about spec instrumentation, we could teach the instrumentation about bond. Bond itself would then need some fairly generic code to pick up metadata and apply additional transformations after stubbing.
What do people think?
The text was updated successfully, but these errors were encountered: