Deduplicate more

This commit is contained in:
quotentiroler
2026-02-09 18:56:58 -08:00
parent c4d9b6eadb
commit 53910f3643
14 changed files with 38 additions and 138 deletions

View File

@@ -2,6 +2,7 @@ import fs from "node:fs/promises";
import os from "node:os";
import path from "node:path";
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
import { pathExists } from "../utils.js";
import { runGatewayUpdate } from "./update-runner.js";
type CommandResult = { stdout?: string; stderr?: string; code?: number };
@@ -21,15 +22,6 @@ function createRunner(responses: Record<string, CommandResult>) {
return { runner, calls };
}
async function pathExists(targetPath: string): Promise<boolean> {
try {
await fs.stat(targetPath);
return true;
} catch {
return false;
}
}
describe("runGatewayUpdate", () => {
let tempDir: string;