Remove safeSpawnSync (unused)

This commit is contained in:
Hans Ott 2025-10-09 16:44:55 +02:00
parent 662b26a2d5
commit 0afea0eed6
2 changed files with 4 additions and 14 deletions

View file

@ -2,7 +2,7 @@ import { describe, it, beforeEach, afterEach, mock } from "node:test";
import assert from "node:assert";
describe("safeSpawn", () => {
let safeSpawnSync, safeSpawn;
let safeSpawn;
let spawnCalls = [];
beforeEach(async () => {
@ -35,7 +35,6 @@ describe("safeSpawn", () => {
// Import after mocking
const safeSpawnModule = await import("./safeSpawn.js");
safeSpawnSync = safeSpawnModule.safeSpawnSync;
safeSpawn = safeSpawnModule.safeSpawn;
});
@ -45,14 +44,10 @@ describe("safeSpawn", () => {
// Helper to run either sync or async variant
async function runSafeSpawn(variant, command, args, options) {
if (variant === "sync") {
return safeSpawnSync(command, args, options);
} else {
return await safeSpawn(command, args, options);
}
return await safeSpawn(command, args, options);
}
for (let variant of ["sync", "async"]) {
for (let variant of ["async"]) {
it(`should pass basic command and arguments correctly (${variant})`, async () => {
await runSafeSpawn(variant, "echo", ["hello"]);
@ -106,4 +101,4 @@ describe("safeSpawn", () => {
assert.strictEqual(spawnCalls[0].options.shell, true);
});
}
});
});