Skip to content

Commit 59a319f

Browse files
committed
f
1 parent 64aa589 commit 59a319f

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

test/diagnostics_channel.test.ts

+6-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { setTimeout as sleep } from 'node:timers/promises';
44
import { createSecureServer } from 'node:http2';
55
import { once } from 'node:events';
66
import { describe, it, beforeEach, afterEach } from 'vitest';
7-
import pem from 'https-pem';
7+
import selfsigned from 'selfsigned';
88
import urllib, { HttpClient } from '../src/index.js';
99
import type {
1010
RequestDiagnosticsMessage,
@@ -142,7 +142,11 @@ describe('diagnostics_channel.test.ts', () => {
142142
});
143143

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

0 commit comments

Comments
 (0)