Last active
August 7, 2016 01:18
-
-
Save rodoabad/88203b458ce6538ff35a67ff68305ad5 to your computer and use it in GitHub Desktop.
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
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