Created
June 19, 2019 23:21
-
-
Save clarkio/51f314c5c5ac0ec41c3e098bee5997f8 to your computer and use it in GitHub Desktop.
@parithon's example of binding this to resolve the issue with our tests for these functions while attempting to wrap in a spy from sinonjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function startMonitoring(milliseconds) { | |
return getStatusEvery.bind(this).(milliseconds) | |
} | |
function getStatusEvery(milliseconds) { | |
this.getStreamStatus(); | |
return setInterval(this.getStreamStatus, milliseconds); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment