Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/JAVA/Openclaw/src/scripts/   (KI Agentensystem Version 22©)  Datei vom 26.3.2026 mit Größe 1 kB image not shown  

Quelle  prepare-codex-ci-config.test.ts

  Sprache: JAVA
 

Spracherkennung für: .ts vermutete Sprache: Unknown {[0] [0] [0]} [Methode: Schwerpunktbildung, einfache Gewichte, sechs Dimensionen]

import fs from "node:fs/promises";
import path from "node:path";
import { describe, expect, it } from "vitest";
import {
  buildCiSafeCodexConfig,
  writeCiSafeCodexConfig,
} from "../../scripts/prepare-codex-ci-config.ts";
import { withTempDir } from "../test-utils/temp-dir.js";

describe("prepare-codex-ci-config", () => {
  it("renders a minimal trusted non-interactive Codex config for the target repo", () => {
    expect(
      buildCiSafeCodexConfig({
        projectPath: "/tmp/openclaw-pr-sync.xph5uu",
      }),
    ).toBe(
      [
        "# Generated for Codex CI runs.",
        "# Keep the checked-out repo trusted while avoiding maintainer-local",
        "# provider/profile overrides that do not exist on CI runners.",
        'approval_policy = "never"',
        'sandbox_mode = "workspace-write"',
        "",
        '[projects."/tmp/openclaw-pr-sync.xph5uu"]',
        'trust_level = "trusted"',
        "",
      ].join("\n"),
    );
  });

  it("writes the generated config to disk", async () => {
    await withTempDir("codex-ci-config-", async (tempDir) => {
      const outputPath = path.join(tempDir, ".codex", "config.toml");
      const projectPath = path.join(tempDir, "repo");

      await writeCiSafeCodexConfig({
        outputPath,
        projectPath,
      });

      await expect(fs.readFile(outputPath, "utf-8")).resolves.toContain(
        `approval_policy = "never"`,
      );
      await expect(fs.readFile(outputPath, "utf-8")).resolves.toContain(
        `[projects."${projectPath}"]`,
      );
    });
  });
});

¤ Dauer der Verarbeitung: 0.12 Sekunden  (vorverarbeitet am  2026-04-27) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.