0.7.1 • Published 11 months ago

@fetch-mock/core v0.7.1

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

@fetch-mock/core

Work in progress reimplememntation of fetch-mock.

Features include:

  • mocks most of the fetch API spec, even advanced behaviours such as streaming and aborting
  • declarative matching for most aspects of a http request, including url, headers, body and query parameters
  • shorthands for the most commonly used features, such as matching a http method or matching one fetch only
  • support for delaying responses, or using your own async functions to define custom race conditions
  • can be used as a spy to observe real network requests
  • can be extended with your own reusable custom matchers that can be used both for matching fetch-calls and inspecting the results
  • isomorphic, and supports either a global fetch instance or a locally required instance

Requirements

@fetch-mock/core requires either of the following to run:

  • Node.js 18+ for full feature operation
  • Any modern browser that supports the fetch API
  • node-fetch when testing in earlier versions of Node.js (this is untested, but should mostly work)

Documentation and Usage

See the project website

License

@fetch-mock/core is licensed under the MIT license. Copyright © 2024, Rhys Evans

0.7.1

11 months ago

0.7.0

12 months ago

0.6.3

12 months ago

0.6.0

1 year ago

0.5.0

1 year ago

0.4.12

1 year ago

0.4.10

1 year ago

0.4.9

1 year ago

0.4.8

1 year ago

0.4.7

1 year ago

0.4.6

1 year ago

0.4.5

1 year ago

0.4.3

1 year ago

0.4.2

1 year ago

0.4.1

1 year ago

0.4.0

1 year ago

0.3.1

1 year ago

0.3.0

1 year ago

0.2.0

1 year ago

0.1.1

1 year ago

0.1.0

1 year ago