-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Labels
Description
Right now we support match as a function but it only operates on the path. Might be cool to switch that (or otherwise support) matching on the whole request summary object ({ url, query } etc.):
mockyeah.get(req => req.url === '/service/exists' && req.query.name === 'me');This could enable more complex matching logic that depends on different parts of the request to cohere, or conditionally matches some parts of the request based on others.
It would be cool if you could either return explicit boolean true/false, or else either throw or return undefined, similar to how existing match functions work inside match-deep - maybe we would use match-deep to process internally, just pass it the request summary object instead of only the url.
Relates to #441.
Reactions are currently unavailable