Created
February 22, 2018 11:41
-
-
Save cybic/62a2a5831bb04ed1b8e7cc7d5bcc8f74 to your computer and use it in GitHub Desktop.
Get the URL of a failing SinonJS Fake Server request
This file contains hidden or 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
// Put this before every other fake.respondWith() to make this a 404 fallback | |
fake.respondWith(xhr => { | |
console.log(xhr.url); | |
return [404, {}, 'Not found']; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment