mockaton 8.2.3 → 8.2.4
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 +3 -0
- package/package.json +1 -1
- package/src/Mockaton.test.js +4 -1
package/README.md
CHANGED
|
@@ -393,6 +393,9 @@ await mockaton.select('api/foo.200.GET.json')
|
|
|
393
393
|
```js
|
|
394
394
|
await mockaton.bulkSelectByComment('(demo-a)')
|
|
395
395
|
```
|
|
396
|
+
Parentheses are optional. You can pass a partial match.
|
|
397
|
+
For example, passing `'demo-'` (without the final `a`), selects the
|
|
398
|
+
first mock in alphabetical order that matches.
|
|
396
399
|
|
|
397
400
|
### Set Route is Delayed Flag
|
|
398
401
|
```js
|
package/package.json
CHANGED
package/src/Mockaton.test.js
CHANGED
|
@@ -212,8 +212,11 @@ async function runTests() {
|
|
|
212
212
|
['/api/alternative', 'api/alternative(comment-2).GET.200.json', { comment: 2 }],
|
|
213
213
|
['/api/my-route', 'api/my-route(comment-2).GET.200.json', { comment: 2 }]
|
|
214
214
|
])
|
|
215
|
-
|
|
215
|
+
await testItBulkSelectsByComment('mment-1', [ // partial match within parentheses
|
|
216
|
+
['/api/alternative', 'api/alternative(comment-1).GET.200.json', 'With_Comment_1']
|
|
217
|
+
])
|
|
216
218
|
await commander.reset()
|
|
219
|
+
|
|
217
220
|
for (const [url, file, body] of fixtures)
|
|
218
221
|
await testMockDispatching(url, file, body)
|
|
219
222
|
|