Skip to content

Conversation

@omer72
Copy link

@omer72 omer72 commented Mar 21, 2016

In case you need to bypass the mock and issue real http request

}
return [200, mock.response, mockHeaders];
});
} if (mock.passThrough) {
Copy link
Owner

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 (....

@nabil-boag
Copy link
Owner

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:
Copy link
Owner

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.

@chrisiconolly
Copy link
Contributor

Is this something your able to add a test for? would be a nice addition.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants