mockaton 8.2.3 → 8.2.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.
package/README.md CHANGED
@@ -69,9 +69,9 @@ _Reset_ button is for registering newly added, removed, or renamed mocks.
69
69
  - Test empty responses
70
70
  - Test spinners by delaying responses
71
71
  - Test errors such as _Bad Request_ and _Internal Server Error_
72
- - Trigger notifications and alerts
73
- - Prototyping before the backend API is developed
74
- - Setting up tests
72
+ - Trigger polled resources such as notifications and alerts
73
+ - Prototype before the backend API is developed
74
+ - Setup tests
75
75
  - As API documentation
76
76
  - If you commit the mocks in the repo, when bisecting a bug, you don’t
77
77
  have to sync the frontend with many backend repos
@@ -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
@@ -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.2.3",
5
+ "version": "8.2.5",
6
6
  "main": "index.js",
7
7
  "types": "index.d.ts",
8
8
  "license": "MIT",
@@ -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