mirror of
https://github.com/moltbot/moltbot.git
synced 2026-05-18 20:19:47 +00:00
test: remove stale transcript jsonl wording
This commit is contained in:
@@ -11,8 +11,8 @@ import {
|
||||
* See https://github.com/openclaw/openclaw/issues/34979
|
||||
*
|
||||
* A plugin tool handler returning undefined produces {type: "text"} (no text
|
||||
* property) in the session JSONL. Without guards, this crashes the char
|
||||
* estimator with: TypeError: Cannot read properties of undefined (reading 'length')
|
||||
* property) in the persisted session transcript. Without guards, this crashes
|
||||
* the char estimator with: TypeError: Cannot read properties of undefined (reading 'length')
|
||||
*/
|
||||
describe("tool-result-char-estimator", () => {
|
||||
it("uses the unknown-block fallback for malformed text blocks", () => {
|
||||
|
||||
@@ -132,7 +132,7 @@ describe("emitResetCommandHooks", () => {
|
||||
);
|
||||
});
|
||||
|
||||
it("uses scoped SQLite transcript events for before_reset when JSONL is missing", async () => {
|
||||
it("uses scoped SQLite transcript events for before_reset without legacy JSONL input", async () => {
|
||||
sqliteTranscriptMocks.hasSqliteSessionTranscriptEvents.mockReturnValue(true);
|
||||
sqliteTranscriptMocks.exportSqliteSessionTranscriptJsonl.mockReturnValue(
|
||||
`${JSON.stringify({
|
||||
|
||||
@@ -272,7 +272,7 @@ describe("buildExportSessionReply", () => {
|
||||
expect(html).toContain('const base64 = document.getElementById("session-data").textContent;');
|
||||
});
|
||||
|
||||
it("exports from scoped SQLite transcript events when the JSONL file is missing", async () => {
|
||||
it("exports from scoped SQLite transcript events without a legacy JSONL file", async () => {
|
||||
const { buildExportSessionReply } = await import("./commands-export-session.js");
|
||||
hoisted.pathExistsMock.mockResolvedValue(false);
|
||||
hoisted.hasSqliteSessionTranscriptEventsMock.mockReturnValue(true);
|
||||
|
||||
@@ -512,7 +512,7 @@ describe("appendAssistantMessageToSessionTranscript", () => {
|
||||
});
|
||||
});
|
||||
|
||||
it("appends scoped SQLite transcript entries without importing JSONL at runtime", async () => {
|
||||
it("appends scoped SQLite transcript entries without runtime legacy import", async () => {
|
||||
const stateDir = fs.mkdtempSync(path.join(os.tmpdir(), "openclaw-transcript-state-"));
|
||||
vi.stubEnv("OPENCLAW_STATE_DIR", stateDir);
|
||||
appendSqliteSessionTranscriptEvent({
|
||||
|
||||
Reference in New Issue
Block a user