mockaton 8.1.4 → 8.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +7 -6
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -12,6 +12,7 @@ By the way, [this browser
12
12
  extension](https://github.com/ericfortis/devtools-ext-tar-http-requests)
13
13
  can create a TAR of your XHR requests following that convention.
14
14
 
15
+ ### Dashboard Example
15
16
 
16
17
  <picture>
17
18
  <source media="(prefers-color-scheme: light)" srcset="./README-dashboard-light.png">
@@ -57,8 +58,8 @@ Experiment with the Dashboard:
57
58
 
58
59
  - Pick a mock variant from the Mock dropdown (we’ll discuss
59
60
  them later)
60
- - Toggle the clock icon, which _Delays_ responses (e.g. for testing spinners)
61
- - Toggle _500_ button, which sends and _Internal Server Error_ on that endpoint
61
+ - Toggle the 🕓 Clock button, which _Delays_ responses (e.g. for testing spinners)
62
+ - Toggle the _500_ button, which sends and _Internal Server Error_ on that endpoint
62
63
 
63
64
  Finally, edit a mock file. You don’t need to restart Mockaton for that. The
64
65
  _Reset_ button is for registering newly added, removed, or renamed mocks.
@@ -92,10 +93,10 @@ _Reset_ button is for registering newly added, removed, or renamed mocks.
92
93
  Each route can have many mocks, which could either be:
93
94
  - Different response __status code__. For example, for testing error responses.
94
95
  - __Comment__ on the filename, which is anything within parentheses.
95
- - e.g. `api/user(my-comment).POST.201.json`
96
+ - e.g. `api/login(locked out user).POST.423.json`
96
97
 
97
- Those alternatives can be manually selected in the dashboard
98
- UI, or programmatically, for instance, for setting up tests.
98
+ Those alternatives can be manually selected on the dashboard, or
99
+ programmatically (see **Commander API** section), for instance, for setting up tests.
99
100
 
100
101
  ### Default Mock for a Route
101
102
  You can add the comment: `(default)` to a filename.
@@ -364,7 +365,7 @@ Config.onReady = open
364
365
 
365
366
  ---
366
367
 
367
- ## HTTP API
368
+ ## Commander API
368
369
  `Commander` is a wrapper for the Mockaton HTTP API.
369
370
  All of its methods return their `fetch` response promise.
370
371
  ```js
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "mockaton",
3
3
  "description": "A deterministic server-side for developing and testing frontend clients",
4
4
  "type": "module",
5
- "version": "8.1.4",
5
+ "version": "8.1.5",
6
6
  "main": "index.js",
7
7
  "types": "index.d.ts",
8
8
  "license": "MIT",