axios-mock-shim
Advanced tools
Comparing version 1.0.0 to 1.0.1
{ | ||
"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` |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
15953