Skip to content

Instantly share code, notes, and snippets.

@JoshuaKGoldberg
Created January 31, 2017 20:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JoshuaKGoldberg/6c8e18d0ab4c7eea5f1e4da6cccca572 to your computer and use it in GitHub Desktop.
Save JoshuaKGoldberg/6c8e18d0ab4c7eea5f1e4da6cccca572 to your computer and use it in GitHub Desktop.
Simple use case for a Sinon stub
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