Feature
I'd like a way to fail a test for any XHR calls that are not expected (ie. that no cy.route() has been set for). Current there's a force404, but that's not enough to be able to actually cause a test to fail
I had thought of using the onResponse option but it gets bypassed for the requests that force404 handles.
cy.server({
force404: true,
onResponse: xhr => {
if (xhr.status === 404) {
expect(true).to.equal(false);
}
}
});
Still wasn't able to find a way to cause a test to fail if the force404:true is invoked, any updates on this issue?
Any news about this, I'd love to see this happen. Is there a lot of work ? I can work on if not
Most helpful comment
Any news about this, I'd love to see this happen. Is there a lot of work ? I can work on if not