Skip to content

Instantly share code, notes, and snippets.

@rodoabad
Last active August 7, 2016 01:18
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 rodoabad/88203b458ce6538ff35a67ff68305ad5 to your computer and use it in GitHub Desktop.
Save rodoabad/88203b458ce6538ff35a67ff68305ad5 to your computer and use it in GitHub Desktop.
describe('when getting a collection of fruits', () => {
it('should call fetch', () => {
const expectedEndPoint = '/fruits';
fetchStub.returns(Promise.resolve());
getFruits();
sinon.assert.calledOnce(fetchStub);
sinon.assert.calledWithExactly(fetchStub, expectedEndPoint);
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment