mocha-param icon indicating copy to clipboard operation
mocha-param copied to clipboard

Fix context (this) access inside callback

Open HoldYourWaffle opened this issue 5 years ago • 0 comments

After about 4 hours of comparing this values, getting confused, trying a lot of things and more confusion, I finally found the (real) solution for #5.

Of course, in hindsight it's a very easy fix. It just took me hours to notice that the callback wasn't directly passed to mocha's it, giving me access to the this-context a normal it call would have.

Sleep at last...

HoldYourWaffle avatar Mar 29 '20 23:03 HoldYourWaffle