Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/Java/Openclaw/src/logging/   (Openclaw AI Version 22©)  Datei vom 26.3.2026 mit Größe 903 B image not shown  

Quelle  config.test.ts

  Sprache: JAVA
 

import { afterEach, describe, expect, it, vi } from "vitest";
import { readLoggingConfig } from "./config.js";

const loadConfigMock = vi.hoisted(() => vi.fn());

vi.mock("../config/config.js", async () => {
  const actual = await vi.importActual<typeof import("../config/config.js")>("../config/config.js");
  return {
    ...actual,
    loadConfig: () => loadConfigMock(),
  };
});

const originalArgv = process.argv;

describe("readLoggingConfig", () => {
  afterEach(() => {
    process.argv = originalArgv;
    loadConfigMock.mockReset();
  });

  it("skips mutating config loads for config schema", async () => {
    process.argv = ["node""openclaw""config""schema"];
    loadConfigMock.mockImplementation(() => {
      throw new Error("loadConfig should not be called");
    });

    expect(readLoggingConfig()).toBeUndefined();
    expect(loadConfigMock).not.toHaveBeenCalled();
  });
});

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

¤ Dauer der Verarbeitung: 0.9 Sekunden  (vorverarbeitet am  2026-06-09) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

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.