Created
January 31, 2017 20:16
-
-
Save JoshuaKGoldberg/6c8e18d0ab4c7eea5f1e4da6cccca572 to your computer and use it in GitHub Desktop.
Simple use case for a Sinon stub
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
succeed_CallsOnSuccess() { | |
// Arrange | |
const spy = sinon.stub(); | |
const actor = new Actor(spy); | |
// Act | |
actor.succeed(); | |
// Assert | |
UTF.Assert.True("onSuccess should have been called", spy.calledOnce); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment