-
Notifications
You must be signed in to change notification settings - Fork 11
add passThrough option #45
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
base: master
Are you sure you want to change the base?
Conversation
app/src/js/multimocks.js
Outdated
| } | ||
| return [200, mock.response, mockHeaders]; | ||
| }); | ||
| } if (mock.passThrough) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please put the if on a new line:
}
if (....
|
This change is great, but can you please write a test for the new case similar to https://github.com/omer72/angular-multimocks/blob/master/app/src/js/multimocks.spec.js#L132 |
README.md
Outdated
| "uri": "/customer/\\d*/cart" | ||
| ``` | ||
|
|
||
| To use the option of bypass the mock and issue real http request, the resource files should look like this: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this deserves its own section i.e.
Bypassing mocks
If you want to bypass mocks and issue a real http request, add an optional passThrough property to your mock.
|
Is this something your able to add a test for? would be a nice addition. |
In case you need to bypass the mock and issue real http request