Spracherkennung für: .ts vermutete Sprache: Unknown {[0] [0] [0]} [Methode: Schwerpunktbildung, einfache Gewichte, sechs Dimensionen]
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 });
}
});
}
¤ Dauer der Verarbeitung: 0.26 Sekunden
(vorverarbeitet am 2026-04-27)
¤
*© Formatika GbR, Deutschland