Skip to content

Commit

Permalink
f
Browse files Browse the repository at this point in the history
  • Loading branch information
fengmk2 committed Dec 17, 2024
1 parent 64aa589 commit 59a319f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions test/diagnostics_channel.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { setTimeout as sleep } from 'node:timers/promises';
import { createSecureServer } from 'node:http2';
import { once } from 'node:events';
import { describe, it, beforeEach, afterEach } from 'vitest';
import pem from 'https-pem';
import selfsigned from 'selfsigned';
import urllib, { HttpClient } from '../src/index.js';
import type {
RequestDiagnosticsMessage,
Expand Down Expand Up @@ -142,7 +142,11 @@ describe('diagnostics_channel.test.ts', () => {
});

it('should support trace socket info with H2 by undici:client:sendHeaders and undici:request:trailers', async () => {
const server = createSecureServer(pem);
const pem = selfsigned.generate();
const server = createSecureServer({
key: pem.private,
cert: pem.cert,
});
server.on('stream', (stream, headers) => {
stream.respond({
'content-type': 'text/plain; charset=utf-8',
Expand Down

0 comments on commit 59a319f

Please sign in to comment.