-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Matching http request are passing #42
Comments
Hey @Tabris841 - two things!
-Dave |
Just dropping by to inform you I have the same problem. |
I'm still planning on fixing this tomorrow :) Hopefully it'll be released then, too! |
Current workaround is to use XHRMock proxy directly after injectMocks injectMocks(scenarios, undefined, {
// allowXHRPassthrough: true,
});
XHRMock.use(proxy); |
Sweet - a fix is in master and I've checked it out and it's good. I'll make a release now. |
Version 2.5.13 is out now and should make everything all good. Let me know if you have any other questions/problems :) Once again, so sorry for taking so long to getting this one sorted! |
Sweet! Works like a charm, thx! And don't be sorry, taking care for your newborn is far more important ;) |
Hi,
First of all i love the idea of the library. Great Job guys!!!. I wanted to include the the library in
my project, but i don't want to mock every request so i set MockConfig allowXHRPassthrough and allowFetchPassthrough to true. And the problem is every request
is passing even when there is matching route and when there is response then data-mocks
replace the response. Is that intended behaviour and can the requests be intercept when they match before sending(cause for example i want to mock and endpoint before is created)?
To Reproduce
Just create angular project the cli and add data-mock.
Set the allowXHRPassthrough and allowFetchPassthrough to true
Create some scenario(example:
{
url: /users/,
method: 'GET',
response: { some: 'good response' },
responseCode: 200
})
Make a http call to that scenario(example: ''http://localhost:3000/api/users')
The text was updated successfully, but these errors were encountered: