Implementation and testing of this passthrough and adding context as extra argument. #29

Closed
wants to merge 4 commits into
from

Conversation

Projects
None yet
2 participants

leei commented Nov 12, 2010

The conversation we had regarding passing this through the callback and adding context as an extra argument are now implemented and tested.

User visible changes:

  • On this.callback triggered vows, the this variable is now bound to the target of the callback invocation in the code being tested. In other words, if the user code responds to the asynchronous call with callback.call(foo, err, status) then this will be bound to foo in the vow's function.
  • If the test code needs to examine the vow's context (e.g. to examine the topics array) then this context is available as an extra argument after all of those sent from the user code.
Owner

indexzero commented Jul 27, 2011

This seems reasonable. The purpose would be to allow this.context to be available inside of individual vow functions correct?

Owner

indexzero commented Nov 4, 2014

Closing for lack of follow-up.

indexzero closed this Nov 4, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment