From e03169597520a1167ba0ea026e16f9b6dd4bd32a Mon Sep 17 00:00:00 2001 From: IYODA Atsushi Date: Sun, 15 Feb 2026 04:44:23 +0900 Subject: [PATCH] test(mcp-oauth): remove redundant findAvailablePort tests (covered by port-utils) --- .../mcp-oauth/callback-server.test.ts | 32 +------------------ 1 file changed, 1 insertion(+), 31 deletions(-) diff --git a/src/features/mcp-oauth/callback-server.test.ts b/src/features/mcp-oauth/callback-server.test.ts index 3958ad70..060cdb58 100644 --- a/src/features/mcp-oauth/callback-server.test.ts +++ b/src/features/mcp-oauth/callback-server.test.ts @@ -1,38 +1,8 @@ import { afterEach, describe, expect, it } from "bun:test" -import { findAvailablePort, startCallbackServer, type CallbackServer } from "./callback-server" +import { startCallbackServer, type CallbackServer } from "./callback-server" const nativeFetch = Bun.fetch.bind(Bun) -describe("findAvailablePort", () => { - it("returns the start port when it is available", async () => { - // given - const startPort = 19877 - - // when - const port = await findAvailablePort(startPort) - - // then - expect(port).toBeGreaterThanOrEqual(startPort) - expect(port).toBeLessThan(startPort + 20) - }) - - it("skips busy ports and returns next available", async () => { - // given - const blocker = Bun.serve({ - port: 19877, - hostname: "127.0.0.1", - fetch: () => new Response(), - }) - - // when - const port = await findAvailablePort(19877) - - // then - expect(port).toBeGreaterThan(19877) - blocker.stop(true) - }) -}) - describe("startCallbackServer", () => { let server: CallbackServer | null = null