5970456a54
CI / check (pull_request) Failing after 8m30s
Rename packages/ subdirectories to match their @united-workforce/* scope: cli-workflow → cli workflow-agent-builtin → agent-builtin workflow-agent-claude-code → agent-claude-code workflow-agent-hermes → agent-hermes workflow-dashboard → dashboard workflow-protocol → protocol workflow-util-agent → util-agent workflow-util → util Updated all tsconfig references, scripts, and active docs. Historical docs (docs/plans/, docs/superpowers/) left as-is. Closes #21
22 lines
758 B
TypeScript
22 lines
758 B
TypeScript
import { describe, expect, test } from "bun:test";
|
|
import { resolve } from "node:path";
|
|
import { resolvePath } from "../src/tools/path.js";
|
|
|
|
describe("resolvePath", () => {
|
|
test("resolves relative paths against cwd", () => {
|
|
const root = "/workspace/project";
|
|
const resolved = resolvePath(root, "src/foo.ts");
|
|
expect(resolved).toBe(resolve(root, "src/foo.ts"));
|
|
});
|
|
|
|
test("resolves absolute paths as-is", () => {
|
|
const resolved = resolvePath("/workspace", "/etc/hosts");
|
|
expect(resolved).toBe("/etc/hosts");
|
|
});
|
|
|
|
test("resolves parent traversal normally", () => {
|
|
const resolved = resolvePath("/workspace/project", "../other/file.ts");
|
|
expect(resolved).toBe(resolve("/workspace/project", "../other/file.ts"));
|
|
});
|
|
});
|