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.6 to 0.2.7

5

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

@@ -40,6 +40,3 @@ "main": "./dist/index.js",

"tinyspy": "^0.2.6"
},
"scripts": {
"publish": "tsup && clean-publish --clean-docs"
}
}

2

README.md

@@ -7,5 +7,5 @@ # 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`.
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 they consider `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