Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 


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.1 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.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Software

     Produkte
     Quellcodebibliothek

Aktivitäten

     Artikel über Sicherheit
     Anleitung zur Aktivierung von SSL

Muße

     Gedichte
     Musik
     Bilder

Jenseits des Üblichen ....

Besucherstatistik

Besucherstatistik

Monitoring

Montastic status badge