marvinhagemeister / xhr-mocklet

Mock XMLHttpRequests in both the browser and node
5 stars 1 forks source link

Fixed bug with multiple handlers #15

Closed jikuja closed 6 years ago

jikuja commented 7 years ago

When using multiple MockCallbacks only first is tested. If callback's method and url do not match then empty MockResponse is being returned to callee.

jikuja commented 7 years ago

Actually asyncs should be called correctly by nesting submit() calls but honestly I was not 100% happy with the code. New commit for better incoming.

marvinhagemeister commented 6 years ago

@joscha Thanks for reviewing this PR 🎉 I don't feel to strong about removing reject or not.

marvinhagemeister commented 6 years ago

It probably makes sense to cut a release shortly with these fixes. I'll try to have a look at it this weekend.