We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f0293c2 commit b35d907Copy full SHA for b35d907
test/parallel/test-tls-alpn-server-client.js
@@ -264,7 +264,17 @@ function TestBadALPNCallback() {
264
// Callback returns 'http/5' => doesn't match client ALPN => error & reset
265
assert.strictEqual(results[0].server, undefined);
266
assert.strictEqual(results[0].client.error.code, 'ECONNRESET');
267
+
268
+ TestALPNOptionsCallback();
269
});
270
}
271
272
+function TestALPNOptionsCallback() {
273
+ // Server always returns a fixed invalid value:
274
+ assert.throws(() => tls.createServer({
275
+ ALPNCallback: () => 'a',
276
+ ALPNProtocols: ['b', 'c']
277
+ }), (error) => error.code === 'ERR_TLS_ALPN_CALLBACK_WITH_PROTOCOLS');
278
+}
279
280
Test1();
0 commit comments