Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion apps/app/src/lib/session-ref.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ describe("EnvironmentSessionRef identity", () => {
});

it("keys the same session on different Environments apart", () => {
expect(sessionRefKey(ref())).toBe(sessionRefKey(ref()));
expect(sessionRefKey(ref())).not.toBe(sessionRefKey(ref({ environmentId: "env-2" })));
});

Expand Down
5 changes: 0 additions & 5 deletions packages/pi-loop/tests/cron.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import {
parseLeadingInterval,
parseRunAt,
previousOccurrence,
stableHash,
} from "../src/cron";

describe("leading interval", () => {
Expand Down Expand Up @@ -127,8 +126,4 @@ describe("jitter", () => {
expect(onHour - jittered).toBeLessThanOrEqual(90_000);
expect(jittered).toBeGreaterThan(created);
});

it("hashes the same id to the same number", () => {
expect(stableHash("a1b2c3d4")).toBe(stableHash("a1b2c3d4"));
});
});
4 changes: 0 additions & 4 deletions packages/server/test/http/handshake.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@ describe("ready line", () => {
expect(parseReadyLine(line)).toEqual({ port: 41234 });
});

it("is prefixed so it can be picked out of ordinary stdout", () => {
expect(formatReadyLine({ port: 1 }).startsWith(READY_PREFIX)).toBe(true);
});

it("ignores an unrelated log line", () => {
expect(parseReadyLine("pie listening on http://127.0.0.1:4000")).toBeNull();
});
Expand Down
11 changes: 1 addition & 10 deletions packages/server/test/worktree.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,7 @@ import path from "node:path";

import { describe, expect, it } from "vitest";

import {
generateWorktreeBranchName,
isValidWorktreeKey,
repoWorktreeGroupKey,
worktreeDirectory,
} from "../src/git/worktree";
import { isValidWorktreeKey, repoWorktreeGroupKey, worktreeDirectory } from "../src/git/worktree";

describe("worktree paths", () => {
it("matches Cursor-style layout under PIE_HOME", () => {
Expand All @@ -21,10 +16,6 @@ describe("worktree paths", () => {
);
});

it("builds pie/ branch names from a hex suffix", () => {
expect(generateWorktreeBranchName("a50b231d")).toBe("pie/a50b231d");
});

it("validates worktree directory keys", () => {
expect(isValidWorktreeKey("mv98")).toBe(true);
expect(isValidWorktreeKey("MV98")).toBe(false);
Expand Down
3 changes: 1 addition & 2 deletions tools/verify/src/runtime/browser.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -195,9 +195,8 @@ describe("shortAgentBrowserSocketDir", () => {
).toBeLessThanOrEqual(AGENT_BROWSER_UNIX_SOCKET_MAX);
});

it("is stable for the same run dir and honors VERIFY_PIE_AGENT_BROWSER_SOCKET_DIR", () => {
it("differs by run dir and honors VERIFY_PIE_AGENT_BROWSER_SOCKET_DIR", () => {
const runDir = "/tmp/pie-verify-web/runs/run-1";
expect(shortAgentBrowserSocketDir(runDir)).toBe(shortAgentBrowserSocketDir(runDir));
expect(shortAgentBrowserSocketDir(runDir)).not.toBe(
shortAgentBrowserSocketDir("/tmp/pie-verify-desktop/runs/run-1"),
);
Expand Down
7 changes: 7 additions & 0 deletions tools/verify/src/surfaces/cli-run.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,11 @@ describe("isHelpOrVersion", () => {
expect(isHelpOrVersion([])).toBe(false);
expect(isHelpOrVersion(["daemon", "status"])).toBe(false);
});

it("allows help and version requests without a current run", () => {
for (const flag of ["--help", "-h", "--version", "-v"]) {
expect(isHelpOrVersion([flag])).toBe(true);
}
expect(isHelpOrVersion(["daemon", "--help"])).toBe(true);
});
});
Loading