|
|
@ -78,7 +78,7 @@ function mime (mimeTypes) { |
|
|
|
|
|
|
|
function mockResponses (route, targets) { |
|
|
|
targets = arrayify(targets) |
|
|
|
debug('mock route: %s, targets: %s', route, targets.length); |
|
|
|
debug('mock route: %s, targets: %s', route, targets.length) |
|
|
|
const pathRe = pathToRegexp(route) |
|
|
|
|
|
|
|
return function mockResponse (ctx, next) { |
|
|
@ -109,7 +109,6 @@ function mockResponses (route, targets) { |
|
|
|
} else { |
|
|
|
throw new Error(`Invalid response: ${JSON.stringify(target.response)}`) |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} else { |
|
|
|
return next() |
|
|
|