mockaton 8.1.5 → 8.1.6
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.
- package/README.md +6 -7
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -45,7 +45,7 @@ node --import=tsx my-mockaton.js
|
|
|
45
45
|
```
|
|
46
46
|
|
|
47
47
|
|
|
48
|
-
## Running the Example
|
|
48
|
+
## Running the Example
|
|
49
49
|
This demo uses the [sample-mocks/](./sample-mocks) directory of this repository.
|
|
50
50
|
|
|
51
51
|
- Checkout this repo
|
|
@@ -216,8 +216,7 @@ Defaults to `/(\.DS_Store|~)$/`
|
|
|
216
216
|
|
|
217
217
|
|
|
218
218
|
### `delay?: number` 🕓
|
|
219
|
-
The clock icon next to the mock selector is a checkbox for delaying a
|
|
220
|
-
particular response. They are handy for testing spinners.
|
|
219
|
+
The clock icon next to the mock selector is a checkbox for delaying a particular response.
|
|
221
220
|
|
|
222
221
|
The delay is globally configurable via `Config.delay = 1200` (milliseconds).
|
|
223
222
|
|
|
@@ -229,7 +228,7 @@ For example, `Config.proxyFallback = 'http://example.com:8080'`
|
|
|
229
228
|
|
|
230
229
|
### `staticDir?: string`
|
|
231
230
|
Files under `Config.staticDir` don’t use the filename convention.
|
|
232
|
-
Also, they take precedence over the `GET` mocks in `Config.
|
|
231
|
+
Also, they take precedence over the `GET` mocks in `Config.mocksDir`.
|
|
233
232
|
|
|
234
233
|
For example, if you have two files for `GET /foo/bar.jpg`
|
|
235
234
|
```
|
|
@@ -250,8 +249,8 @@ The key is just a label used for selecting a particular cookie in the
|
|
|
250
249
|
dashboard. In the dashboard, only one cookie can be selected. If you need
|
|
251
250
|
more cookies you can inject additional cookies globally in `Config.extraHeaders`.
|
|
252
251
|
|
|
253
|
-
`jwtCookie` has a hardcoded header and
|
|
254
|
-
words, it’s useful if you only care about its payload.
|
|
252
|
+
By the way, there’s a `jwtCookie` helper, which has a hardcoded header and
|
|
253
|
+
signature. In other words, it’s useful if you only care about its payload.
|
|
255
254
|
|
|
256
255
|
```js
|
|
257
256
|
import { jwtCookie } from 'mockaton'
|
|
@@ -281,7 +280,7 @@ Config.extraHeaders = [
|
|
|
281
280
|
### `extraMimes?: { [fileExt: string]: string }`
|
|
282
281
|
```js
|
|
283
282
|
Config.extraMimes = {
|
|
284
|
-
|
|
283
|
+
jpe: 'application/jpeg'
|
|
285
284
|
}
|
|
286
285
|
```
|
|
287
286
|
|
package/package.json
CHANGED