55 * It exposes an HTTP server that allows Playwright tests to execute
66 * code with access to the VS Code API.
77 */
8- import type { IncomingMessage , ServerResponse } from 'http' ;
9- import { createServer } from 'http' ;
10- import type { AddressInfo } from 'net' ;
8+ import type { IncomingMessage , ServerResponse } from 'node:http' ;
9+ import { createServer } from 'node:http' ;
10+ import type { AddressInfo } from 'node:net' ;
11+ import * as process from 'node:process' ;
1112import * as vscode from 'vscode' ;
1213
1314interface InvokeRequest {
@@ -74,7 +75,7 @@ async function handleRequest(req: IncomingMessage, res: ServerResponse): Promise
7475
7576export async function run ( ) : Promise < void > {
7677 const server = createServer ( ( req , res ) => {
77- handleRequest ( req , res ) . catch ( err => {
78+ handleRequest ( req , res ) . catch ( ( err : unknown ) => {
7879 res . writeHead ( 500 ) ;
7980 res . end ( String ( err ) ) ;
8081 } ) ;
@@ -84,7 +85,7 @@ export async function run(): Promise<void> {
8485 const address = server . address ( ) as AddressInfo ;
8586
8687 // This message is parsed by the Playwright test to get the server URL
87- // eslint-disable-next-line no-restricted-globals
88+
8889 process . stderr . write ( `VSCodeTestServer listening on http://localhost:${ address . port } \n` ) ;
8990
9091 // Keep running until process exits (VS Code closes)
0 commit comments