MCPcopy Index your code
hub / github.com/di-sukharev/opencommit / assertNoPendingInterceptors

Method assertNoPendingInterceptors

out/cli.cjs:57872–57883  ·  view source on GitHub ↗
({ pendingInterceptorsFormatter = new PendingInterceptorsFormatter() } = {})

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 4

pendingInterceptorsMethod · 0.80
pluralizeMethod · 0.80
trimMethod · 0.80
formatMethod · 0.45

Tested by

no test coverage detected