Skip to content

Commit

Permalink
fix(#1041): apply filteringPath from nockBack before option
Browse files Browse the repository at this point in the history
  • Loading branch information
vwxyutarooo committed Oct 31, 2018
1 parent 048c07d commit 6d5bca2
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions lib/scope.js
Expand Up @@ -332,9 +332,12 @@ function define(nockDefs) {
nock.matchHeader(k, reqheaders[k]);
}
}
if (nockDef.filteringRequestBody) {
nock.filteringRequestBody(nockDef.filteringRequestBody);
}
var acceptableFilters = ['filteringRequestBody', 'filteringPath'];
acceptableFilters.forEach((filter) => {
if (nockDef[filter]) {
nock[filter](nockDef[filter]);
}
});
nock.intercept(npath, method, body).reply(status, response, rawHeaders);
}

Expand Down

0 comments on commit 6d5bca2

Please sign in to comment.