-
Notifications
You must be signed in to change notification settings - Fork 259
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
Issue with Injection in Predicate #63
Comments
Hi there, "predicates": [ The second log statement will show you what the request looks like, and you On Fri, Apr 10, 2015 at 12:49 PM, anu0123 notifications@github.com wrote:
|
I am injecting this function in a response which is captured after loading a request onto MounteBank but still it doesn't work. |
Hi there, I am injecting this function in a response which is captured after loading
Sorry you're having trouble. Can you send the full imposter JSON you're I had one other question too. Which all predicates can we use besides
The predicateGenerators objects only accept matches. You can augment them
|
Yes. The decorate behavior
<http://www.mbtest.org/docs/api/behaviors#behavior-decorate> accepts both
the request and response as parameters. You can return the modified
response from the function. See the linked to page for examples.
-Brandon
…On Sat, Oct 27, 2018 at 12:31 AM RoyalGunjan007 ***@***.***> wrote:
Is there a way to read response file inside decorate and modify it as per
use?
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#63 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAESvyYeDpyDEaEUZckaroRTsrEtZtwvks5uo--rgaJpZM4D-MU4>
.
|
Hi
I am unable to inject any Javascript function inside the predicates of one of the stub.
In the request i have asked to match the Query under PredicateGenerators.
The function which i have written is very simple
"predicates": [
{
{ "deepEquals":
{
"query":
{"inject": "function(logger)
{logger.info('Inside injection';)}"
}}}
}
I am not able to see any information on logs.
I have allowed Injection on mountebank startup by
mb --allowInjection.
Can anyone suggest anything ? Or if any changes has to be made ?
The text was updated successfully, but these errors were encountered: