Files
node/test/parallel/test-quic-tls-trace.mjs
2026-07-27 19:04:04 +02:00

32 lines
830 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';
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;
assert.strictEqual(clientSession.destroyed, false);
await clientSession.closed;
await serverEndpoint.close();