npm fetch-mock 7.0.0-beta.1
Simplified call filtering

latest releases: 10.0.0-alpha.1, 9.11.0, 9.10.10...
5 years ago

Feels like a big step forward in simplicity and power, emerging from the realisation that if a matcher is used to filter as a matcher after it's already been used to filter as a name of a route, then this will be a noop because only calls that satisfy the matcher will be included in the list to filter further

  • matches using name (or inferred identifier) first
  • If no routes have it as a name or identifier, just execute as a matcher
  • Finally, if there are options provided filter further by executing these as a route

Easier to think about, document and implement

Also removed filtering by method from .done() - in hindsight this was a poor idea to ever add

Don't miss a new fetch-mock release

NewReleases is sending notifications on new releases.