fix: Windows test compat — shell quoting, line endings, binary names
- Replace single-quoted git commit messages in worktree tests with double quotes (cmd.exe doesn't treat single quotes as delimiters) - Trim stdout in spawn tests to handle \r\n vs \n - Use nonexistent binary name in executable test not-found case
This commit is contained in:
@@ -49,6 +49,7 @@ async function loadExecutableModule(params?: {
|
||||
|
||||
describe("findExecutable", () => {
|
||||
const originalPlatform = process.platform;
|
||||
const missingBinaryName = "nonexistent-binary-xyz-12345";
|
||||
|
||||
function setPlatform(value: string) {
|
||||
Object.defineProperty(process, "platform", { value, writable: true });
|
||||
@@ -118,7 +119,7 @@ describe("findExecutable", () => {
|
||||
},
|
||||
});
|
||||
|
||||
await expect(findExecutable("codex")).resolves.toBeNull();
|
||||
await expect(findExecutable(missingBinaryName)).resolves.toBeNull();
|
||||
});
|
||||
|
||||
test("on Windows, falls back to the first extensionless candidate when needed", async () => {
|
||||
|
||||
Reference in New Issue
Block a user