Signed-off-by: James M Snell <jasnell@gmail.com> Assisted-by: Opencode:Opus 4.6 PR-URL: https://github.com/nodejs/node/pull/62876 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Filip Skokan <panva.ip@gmail.com> Reviewed-By: Paolo Insogna <paolo@cowtech.it> Reviewed-By: Robert Nagy <ronagy@icloud.com>
33 lines
856 B
JavaScript
33 lines
856 B
JavaScript
// Flags: --experimental-quic --no-warnings
|
|
|
|
// Test: TLS trace output.
|
|
// When tlsTrace: true is set, the session produces TLS debug
|
|
// output on stderr. Verify the option is accepted without error
|
|
// and the connection succeeds.
|
|
|
|
import { hasQuic, skip, mustCall } from '../common/index.mjs';
|
|
import assert from 'node:assert';
|
|
|
|
const { strictEqual } = assert;
|
|
|
|
if (!hasQuic) {
|
|
skip('QUIC is not enabled');
|
|
}
|
|
|
|
const { listen, connect } = await import('../common/quic.mjs');
|
|
|
|
const serverEndpoint = await listen(mustCall(async (serverSession) => {
|
|
await serverSession.opened;
|
|
await serverSession.close();
|
|
}), {
|
|
tlsTrace: true,
|
|
});
|
|
|
|
const clientSession = await connect(serverEndpoint.address, {
|
|
tlsTrace: true,
|
|
});
|
|
await clientSession.opened;
|
|
strictEqual(clientSession.destroyed, false);
|
|
|
|
await clientSession.closed;
|
|
await serverEndpoint.close();
|