Skip to content

Commit fd1beff

Browse files
committed
fix: guard server tests behind TEST_INTEGRATION flag
Address Codex review - wrap test suite in describeIntegration to skip when TEST_INTEGRATION is not set, matching the pattern used by other integration tests in tests/ipcMain/.
1 parent 5956348 commit fd1beff

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

tests/server/server.test.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,12 @@
77
* - IPC channel routing
88
* - WebSocket connections and subscriptions
99
* - Project listing/management
10+
*
11+
* Run with: TEST_INTEGRATION=1 bun x jest tests/server/server.test.ts
12+
* Requires: make build-main (tests use built server from dist/cli/server.js)
1013
*/
11-
// Uses Jest globals injected by test runner (see jest.config.js)
1214
import { IPC_CHANNELS } from "../../src/common/constants/ipc-constants";
15+
import { shouldRunIntegrationTests } from "../testUtils";
1316
import {
1417
type ServerTestContext,
1518
startServer,
@@ -22,13 +25,16 @@ import {
2225
waitForWsOpen,
2326
} from "./serverTestUtils";
2427

28+
// Skip all tests if TEST_INTEGRATION is not set
29+
const describeIntegration = shouldRunIntegrationTests() ? describe : describe.skip;
30+
2531
// Each test gets a unique ID to avoid directory conflicts
2632
let testCounter = 0;
2733
function getTestId(): string {
2834
return `server-test-${Date.now()}-${++testCounter}`;
2935
}
3036

31-
describe("mux-server", () => {
37+
describeIntegration("mux-server", () => {
3238
describe("health endpoint", () => {
3339
let ctx: ServerTestContext;
3440
let muxRoot: string;

0 commit comments

Comments
 (0)