Skip to content

Commit

Permalink
Fix isse where callback behavior and docs were inconsistent
Browse files Browse the repository at this point in the history
for onEachBegin, onEachEnd, etc `this` should be the test, not the group that added the callback
  • Loading branch information
pineapplemachine committed Mar 29, 2018
1 parent fb6bb72 commit d43e753
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion canary.js
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,7 @@ class CanaryTest{
}
// Actually attempt the callback.
try{
const result = callback.body.call(callback.owner, callback.owner, ...callbackArguments);
const result = callback.body.call(this, this, ...callbackArguments);
// If the callback returned a promise, then wait for it to resolve.
if(result instanceof Promise){
await result;
Expand Down

0 comments on commit d43e753

Please sign in to comment.