products/Sources/formale Sprachen/C/Postgres/src/test/isolation/specs/   (Postgres Database Version 18.4©)  Datei vom 11.4.2026 mit Größe 2 kB image not shown  

Quellcode-Bibliothek generated-plugin-test-helpers.ts  Sprache: unbekannt

 
import fs from "node:fs";
import os from "node:os";
import path from "node:path";
import { afterEach } from "vitest";

export const pluginTestRepoRoot = path.resolve(import.meta.dirname, "../..");

const tempDirs: string[] = [];

export function writeJson(filePath: string, value: unknown): void {
  fs.mkdirSync(path.dirname(filePath), { recursive: true });
  fs.writeFileSync(filePath, `${JSON.stringify(value, null, 2)}\n`, "utf8");
}

export function createGeneratedPluginTempRoot(prefix: string): string {
  const tempRoot = fs.mkdtempSync(path.join(os.tmpdir(), prefix));
  tempDirs.push(tempRoot);
  return tempRoot;
}

export function installGeneratedPluginTempRootCleanup() {
  afterEach(() => {
    for (const dir of tempDirs.splice(0)) {
      fs.rmSync(dir, { recursive: true, force: true });
    }
  });
}

Messung V0.5 in Prozent
C=100 H=90 G=95

[0.5QuellennavigatorsProjekt 2026-09-27]