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

Function testWrongALPN

test/parallel/test-http2-https-fallback.js:150–159  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

148 }
149
150 function testWrongALPN() {
151 // Incompatible ALPN TLS client
152 tls(Object.assign({ port, ALPNProtocols: ['fake'] }, clientOptions))
153 .on('error', common.mustCall((err) => {
154 const allowedErrors = ['ECONNRESET', 'ERR_SSL_TLSV1_ALERT_NO_APPLICATION_PROTOCOL'];
155 assert.ok(allowedErrors.includes(err.code), `'${err.code}' was not one of ${allowedErrors}.`);
156 cleanup();
157 testNoALPN();
158 }));
159 }
160
161 function testNoALPN() {
162 // TLS client does not send an ALPN extension

Callers

nothing calls this directly

Calls 6

testNoALPNFunction · 0.85
assignMethod · 0.80
includesMethod · 0.80
cleanupFunction · 0.70
onMethod · 0.45
okMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…