Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vi-fetch

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vi-fetch - npm Package Compare versions

Comparing version 0.2.4 to 0.2.5

2

package.json
{
"name": "vi-fetch",
"version": "0.2.4",
"version": "0.2.5",
"description": "Easiest way to mock fetch",

@@ -5,0 +5,0 @@ "main": "./dist/index.js",

@@ -5,5 +5,7 @@ # vi-fetch

Compatible with [Jest](https://github.com/facebook/jest) when using ESM flag and [Vitest](https://github.com/vitest-dev/vitest).
Compatible with [Vitest](https://github.com/vitest-dev/vitest) and [Jest](https://github.com/facebook/jest) when using [ESM flag](https://jestjs.io/docs/ecmascript-modules) or with transform for `/node_modules/vi-fetch`.
The main difference with [fetch-mock](https://github.com/wheresrhys/fetch-mock) or [fetch-mock-jest](https://github.com/wheresrhys/fetch-mock-jest) is that it considers `fetch` just as a function call instead of calls to _endpoints_. `vi-fetch` provides matchers to test calls to _endpoints_ instead of simply function calls. For example, we consider an endpoint to be URL until the first `?`, query is like arguments to an endpoint, just like `body` - that's why we provide matchers like `toHaveFetchedWithQuery`.
## Docs
Read **[full docs](https://github.com/sheremet-va/vi-fetch#readme)** on GitHub.
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc