Closed
Description
This would solve...
Using intercepted requests for assertions.
My specific usecase is actions/create-github-app-token#217. In actions/create-github-app-token
we define two interceptors centrally. We test by creating snapshots of the output of the action call. By logging out the intercepted requests here and here, the request options become part of the snapshot which allows us to prevent regressions and to confirm that our action behaves the correct way.
The implementation should look like...
Maybe something like this
mockPool.addListener('request', (requestOptions) => { ... })
An alternative could be a way to access all intercepted requests
const requests = mockAgent.interceptedRequests
I have also considered...
I tried a few things but nothing worked out for our use case.