({ pendingInterceptorsFormatter = new PendingInterceptorsFormatter() } = {})
| 57870 | } |
| 57871 | [kGetNetConnect]() { |
| 57872 | return this[kNetConnect]; |
| 57873 | } |
| 57874 | pendingInterceptors() { |
| 57875 | const mockAgentClients = this[kClients]; |
| 57876 | return Array.from(mockAgentClients.entries()).flatMap(([origin2, scope]) => scope.deref()[kDispatches].map((dispatch) => ({ ...dispatch, origin: origin2 }))).filter(({ pending }) => pending); |
| 57877 | } |
| 57878 | assertNoPendingInterceptors({ pendingInterceptorsFormatter = new PendingInterceptorsFormatter() } = {}) { |
| 57879 | const pending = this.pendingInterceptors(); |
| 57880 | if (pending.length === 0) { |
| 57881 | return; |
| 57882 | } |
| 57883 | const pluralizer = new Pluralizer("interceptor", "interceptors").pluralize(pending.length); |
| 57884 | throw new UndiciError(` |
| 57885 | ${pluralizer.count} ${pluralizer.noun} ${pluralizer.is} pending: |
| 57886 |
nothing calls this directly
no test coverage detected