MCPcopy Index your code
hub / github.com/nodejs/node / expectConnectionDeclined

Method expectConnectionDeclined

test/common/inspector-helper.js:468–478  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

466 }
467
468 async expectConnectionDeclined() {
469 this._logger.log('[test]', 'Checking upgrade is not possible');
470 const upgradeRequest = await this.sendUpgradeRequest();
471 return new Promise((resolve) => {
472 upgradeRequest
473 .on('upgrade', common.mustNotCall('Upgrade was received'))
474 .on('response', (response) =>
475 response.on('data', () => {})
476 .on('end', () => resolve(response.statusCode)));
477 });
478 }
479
480 expectShutdown() {
481 return this._shutdownPromise;

Callers

nothing calls this directly

Calls 4

sendUpgradeRequestMethod · 0.95
resolveFunction · 0.70
logMethod · 0.45
onMethod · 0.45

Tested by

no test coverage detected