MCPcopy Create free account
hub / github.com/angular/dev-infra / checkNetConnect

Function checkNetConnect

github-actions/saucelabs/set-saucelabs-env.js:11146–11154  ·  view source on GitHub ↗
(netConnect, origin)

Source from the content-addressed store, hash-verified

11144 const body = typeof _data === "function" ? _data(__spreadProps(__spreadValues({}, opts), { headers: optsHeaders })) : _data;
11145 if (isPromise(body)) {
11146 body.then((newData) => handleReply(mockDispatches, newData));
11147 return;
11148 }
11149 const responseData = getResponseData(body);
11150 const responseHeaders = generateKeyValues(headers);
11151 const responseTrailers = generateKeyValues(trailers);
11152 (_a = handler.onConnect) == null ? void 0 : _a.call(handler, (err) => handler.onError(err), null);
11153 (_b = handler.onHeaders) == null ? void 0 : _b.call(handler, statusCode, responseHeaders, resume, getStatusText(statusCode));
11154 (_c = handler.onData) == null ? void 0 : _c.call(handler, Buffer.from(responseData));
11155 (_d = handler.onComplete) == null ? void 0 : _d.call(handler, responseTrailers);
11156 deleteMockDispatch(mockDispatches, key);
11157 }

Callers 1

buildMockDispatchFunction · 0.70

Calls 1

matchValueFunction · 0.70

Tested by

no test coverage detected