undici icon indicating copy to clipboard operation
undici copied to clipboard

feat: draft: adds a onMissedRequest hook for seeing missed mocks

Open James1x0 opened this issue 2 years ago • 4 comments

This relates to...

#2681

Rationale

To enable easier debugging of the mockagent, as discussed in #1600

Changes

  • docs: added an example of mockAgent onMissedRequest option
  • test: added a basic test for onMissedRequest
  • feat: added onMissedRequest
    • Added mock symbol for callback
    • Added logic in mock-utils dispatch to emit the hook

Features

  • added onMissedRequest hook for debugging mismatched requests

Bug Fixes

No bugs fixed

Breaking Changes and Deprecations

No breaking changes or deprecations

Status

  • [x] I have read and agreed to the Developer's Certificate of Origin
  • [x] Tested
  • [S] Benchmarked (optional)
  • [ ] Documented (will add specific option documentation in case spec changes)
  • [x] Review ready
  • [ ] In review
  • [ ] Merge ready

James1x0 avatar Jan 31 '24 23:01 James1x0