-
Notifications
You must be signed in to change notification settings - Fork 89
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
Stubs for certain request methods? #87
Comments
@sezanzeb I myself haven't gotten stubs to work but checkout the declaration for |
By passing the method as first argument, the request will hang forever :-( |
This should work. moxios.stubRequest('/say/hello', {
method: 'POST',
status: 200,
responseText: 'hello',
}) |
☝️ Could one of the developers please update the dist and publish a new package to npm? Thanks that would be wonderful! |
#106 should fix this. I'm not so sure who is in charge as of now since the package is untouched for a while already 😅 As a work around, you could absolutely clone the repo, build it and push to Github or whatever repository you can have access to and install via the trick below. In my case, I created one at https://github.com/willnguyen1312/moxios/tree/main and install like so: |
I want to add different stubs for GET and POST methods on the same URL.
The text was updated successfully, but these errors were encountered: