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

Quelle  display.test.ts

  Sprache: JAVA
 

import { describe, expect, it } from "vitest";
import { resolveAuthProfileDisplayLabel } from "./display.js";

describe("resolveAuthProfileDisplayLabel", () => {
  it("prefers displayName over email metadata", () => {
    const label = resolveAuthProfileDisplayLabel({
      cfg: {
        auth: {
          profiles: {
            "openai-codex:id-abc": {
              provider: "openai-codex",
              mode: "oauth",
              displayName: "Work account",
              email: "work@example.com",
            },
          },
        },
      },
      store: { version: 1, profiles: {} },
      profileId: "openai-codex:id-abc",
    });

    expect(label).toBe("openai-codex:id-abc (Work account)");
  });

  it("does not synthesize bogus labels when no human metadata exists", () => {
    const label = resolveAuthProfileDisplayLabel({
      store: {
        version: 1,
        profiles: {
          "openai-codex:id-abc": {
            type: "oauth",
            provider: "openai-codex",
            access: "token",
            refresh: "refresh-token",
            expires: Date.now() + 60_000,
          },
        },
      },
      profileId: "openai-codex:id-abc",
    });

    expect(label).toBe("openai-codex:id-abc");
  });
});

Messung V0.5 in Prozent
C=98 H=97 G=97

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

*© 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.