mockaton 0.10.1 → 0.10.2
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 +5 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -24,7 +24,7 @@ Each route can have many mocks, which could either be:
|
|
|
24
24
|
Those alternatives can be manually selected in the dashboard
|
|
25
25
|
UI, or programmatically, for instance, for setting up tests.
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
The first file in **alphabetical order** becomes the default mock.
|
|
28
28
|
|
|
29
29
|
### Proxying Routes
|
|
30
30
|
`Config.proxyFallback` lets you specify a target
|
|
@@ -43,7 +43,7 @@ exploring its [sample-mocks/](./sample-mocks) directory. Then, run
|
|
|
43
43
|
The clock icon next to the mock selector is a checkbox for delaying a
|
|
44
44
|
particular response. They are handy for testing spinners.
|
|
45
45
|
|
|
46
|
-
The
|
|
46
|
+
The delay is globally configurable via `Config.delay = 1200` (milliseconds).
|
|
47
47
|
|
|
48
48
|
---
|
|
49
49
|
|
|
@@ -57,8 +57,8 @@ import { resolve } from 'node:path'
|
|
|
57
57
|
import { Mockaton } from 'mockaton'
|
|
58
58
|
|
|
59
59
|
Mockaton({
|
|
60
|
-
mocksDir: resolve('my-mocks-dir'),
|
|
61
|
-
|
|
60
|
+
mocksDir: resolve('my-mocks-dir'),
|
|
61
|
+
port: 2345
|
|
62
62
|
})
|
|
63
63
|
```
|
|
64
64
|
|
|
@@ -84,7 +84,7 @@ interface Config {
|
|
|
84
84
|
|
|
85
85
|
## Cookies
|
|
86
86
|
```js
|
|
87
|
-
import { jwtCookie } from '
|
|
87
|
+
import { jwtCookie } from 'mockaton'
|
|
88
88
|
|
|
89
89
|
Config.cookies = {
|
|
90
90
|
'My Admin User': 'my-cookie=1;Path=/;SameSite=strict',
|
package/package.json
CHANGED