Created
January 8, 2019 12:59
-
-
Save cybic/a3d96815d9699901244176b26bc61019 to your computer and use it in GitHub Desktop.
Sinon FakeServer fail on not covered
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
beforeEach(() => { | |
fake = sinon.fakeServer.create(); | |
// Fail on requests not covered by fakeserver | |
fake.respondWith(xhr => { | |
fail('FakeServer does not provide any result for URL ' + xhr.url) | |
}); | |
fake.respondImmediately = true; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment