feat: update server port handling and improve session lifecycle test assertions

This commit is contained in:
catlog22
2026-01-05 10:48:08 +08:00
parent b361f42c1c
commit 256a07e584
4 changed files with 174 additions and 552 deletions

View File

@@ -244,7 +244,7 @@ window.INITIAL_PATH = '${normalizePathForDisplay(initialPath).replace(/\\/g, '/'
* @returns {Promise<http.Server>}
*/
export async function startServer(options: ServerOptions = {}): Promise<http.Server> {
const port = options.port || 3456;
const port = options.port ?? 3456;
const initialPath = options.initialPath || process.cwd();
const server = http.createServer(async (req, res) => {