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

Quelle  thread-binding-id.test.ts

  Sprache: JAVA
 

import { describe, expect, it } from "vitest";
import { resolveThreadBindingConversationIdFromBindingId } from "./thread-binding-id.js";

describe("resolveThreadBindingConversationIdFromBindingId", () => {
  it("returns the conversation id for matching account-prefixed binding ids", () => {
    expect(
      resolveThreadBindingConversationIdFromBindingId({
        accountId: "default",
        bindingId: "default:thread-123",
      }),
    ).toBe("thread-123");
  });

  it("returns undefined when binding id is missing or account prefix does not match", () => {
    expect(
      resolveThreadBindingConversationIdFromBindingId({
        accountId: "default",
        bindingId: undefined,
      }),
    ).toBeUndefined();
    expect(
      resolveThreadBindingConversationIdFromBindingId({
        accountId: "default",
        bindingId: "work:thread-123",
      }),
    ).toBeUndefined();
  });

  it("trims whitespace and rejects empty ids after the account prefix", () => {
    expect(
      resolveThreadBindingConversationIdFromBindingId({
        accountId: "default",
        bindingId: "  default:group-1:topic:99  ",
      }),
    ).toBe("group-1:topic:99");
    expect(
      resolveThreadBindingConversationIdFromBindingId({
        accountId: "default",
        bindingId: "default:   ",
      }),
    ).toBeUndefined();
  });
});

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

¤ Dauer der Verarbeitung: 0.12 Sekunden  (vorverarbeitet am  2026-05-26) ¤

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