Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/Java/Openjdk/test/hotspot/gtest/utilities/   (Sun/Oracle ©)  Datei vom 13.11.2022 mit Größe 2 kB image not shown  

Impressum export.node.test.ts

  Sprache: JAVA
 

// @vitest-environment node
import { describe, expect, it } from "vitest";
import { buildChatMarkdown } from "./export.ts";

describe("chat export", () => {
  it("returns null for empty history", () => {
    expect(buildChatMarkdown([], "Bot")).toBeNull();
  });

  it("renders markdown headings and strips assistant thinking tags", () => {
    const markdown = buildChatMarkdown(
      [
        {
          role: "assistant",
          content: "<thinking>scratchpad</thinking>Final answer",
          timestamp: Date.UTC(20262111200),
        },
      ],
      "Bot",
    );

    expect(markdown).toContain("# Chat with Bot");
    expect(markdown).toContain("## Bot (2026-03-11T12:00:00.000Z)");
    expect(markdown).toContain("Final answer");
    expect(markdown).not.toContain("scratchpad");
  });
});

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

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

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