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

axios-mock-shim

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

axios-mock-shim - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

2

package.json
{
"name": "axios-mock-shim",
"version": "1.0.0",
"version": "1.0.1",
"description": "A plugin build for easily using axios-mock-adapter with axios",

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

@@ -28,3 +28,3 @@ # Axios Mock Shim

- #### createAxios(axiosConfig)
- **createAxios(axiosConfig)**

@@ -37,3 +37,3 @@ Create Axios instance by given config.

- #### createAPIHandler(axiosInstance, shimOptions)
- **createAPIHandler(axiosInstance, shimOptions)**

@@ -63,21 +63,21 @@ Create an `AxiosRequest` object, which you can then use to define & call the api with specific mock data.

- #### use(method, svc, data)
- **use(method, svc, data)**
Define the api setting
1. method: http method
**required**
- type: `string`
1. method: http method
**required**
- type: `string`
2. svc: url path
**required**
- type: `string`
2. svc: url path
**required**
- type: `string`
(note => without baseURL in axios instance)
3. data: params or data
**optional**
3. data: params or data
**optional**
- type: `object`
- #### with(replyHandler)
- **with(replyHandler)**

@@ -96,3 +96,3 @@ Define the mock reply data.

- #### run()
- **run()**

@@ -99,0 +99,0 @@ Execute the `AxiosRequest`

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