Skip to content

Commit

Permalink
FIX (interceptor): When multiple mocks for the same url exist it igno…
Browse files Browse the repository at this point in the history
…red active status of the mock (#262)

When having 2 or more mocks on the same route, we tried to get the first matching mock, however we did not check if the mock is disabled.
  • Loading branch information
kmichal authored and morsdyce committed Oct 20, 2018
1 parent 9969f61 commit f7ac245
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/api/interceptors/web-interceptor.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class WebInterceptor {

getMatchingMock(mocks, request) {
for (let mock of mocks) {
if (mock.matches(request)) {
if (mock.matches(request) && mock.isActive) {
return mock;
}
}
Expand Down

0 comments on commit f7ac245

Please sign in to comment.