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
One thing that's always tough is debugging dynamic test doubles, in part b/c it can be problematic for them to implement a toString function of their own, and in part because any descriptors or names need to be provided to them by the caller (since they're not typically mirroring a known type). Additionally, we'll want to expose some metadata without adding methods or properties to the test double itself.
What if we had a top-level explain function that took a test double object and returned some nice descriptors:
{
description:
"This test double has 1 stubbing and has been invoked 0 times. \n"+
"\n"+
"Stubbings: \n" +
" when called with (8,9,10) then return 11 \n"
callCount: 0
calls: []
}
The text was updated successfully, but these errors were encountered:
One thing that's always tough is debugging dynamic test doubles, in part b/c it can be problematic for them to implement a
toString
function of their own, and in part because any descriptors or names need to be provided to them by the caller (since they're not typically mirroring a known type). Additionally, we'll want to expose some metadata without adding methods or properties to the test double itself.What if we had a top-level
explain
function that took a test double object and returned some nice descriptors:Might return:
Might return:
The text was updated successfully, but these errors were encountered: