fix: make overflow tests cross-platform for Windows CI (#490)

Co-authored-by: Letta <noreply@letta.com>
This commit is contained in:
Charles Packer
2026-01-07 16:47:02 -08:00
committed by GitHub
parent 808ed36212
commit ec2627d749
3 changed files with 83 additions and 59 deletions

View File

@@ -60,9 +60,12 @@ describe("overflow utilities", () => {
test("sanitizes working directory path", () => {
const dir = getOverflowDirectory("/path/with spaces/and:colons");
expect(dir).not.toContain(" ");
expect(dir).not.toContain(":");
expect(dir).toContain("path_with_spaces_and_colons");
// The sanitized segment (derived from input path) should have no spaces/colons
// On Windows, the full path contains C:\ so we check the segment, not full path
const sanitizedSegment = "path_with_spaces_and_colons";
expect(dir).toContain(sanitizedSegment);
expect(sanitizedSegment).not.toContain(" ");
expect(sanitizedSegment).not.toContain(":");
});
});