Spracherkennung für: .ts vermutete Sprache: Unknown {[0] [0] [0]} [Methode: Schwerpunktbildung, einfache Gewichte, sechs Dimensionen]
import { describe, expect, it } from "vitest";
import { validateConfigObjectRaw } from "./validation.js";
describe("thread binding config keys", () => {
it("rejects legacy session.threadBindings.ttlHours", () => {
const result = validateConfigObjectRaw({
session: {
threadBindings: {
ttlHours: 24,
},
},
});
expect(result.ok).toBe(false);
if (result.ok) {
return;
}
expect(result.issues).toContainEqual(
expect.objectContaining({
path: "session.threadBindings",
message: expect.stringContaining("ttlHours"),
}),
);
});
it("rejects legacy channels.<id>.threadBindings.ttlHours", () => {
const result = validateConfigObjectRaw({
channels: {
demo: {
threadBindings: {
ttlHours: 24,
},
},
},
});
expect(result.ok).toBe(false);
if (result.ok) {
return;
}
expect(result.issues).toContainEqual(
expect.objectContaining({
path: "channels",
message: expect.stringContaining("ttlHours"),
}),
);
});
it("rejects legacy channels.<id>.accounts.<id>.threadBindings.ttlHours", () => {
const result = validateConfigObjectRaw({
channels: {
demo: {
accounts: {
alpha: {
threadBindings: {
ttlHours: 24,
},
},
},
},
},
});
expect(result.ok).toBe(false);
if (result.ok) {
return;
}
expect(result.issues).toContainEqual(
expect.objectContaining({
path: "channels",
message: expect.stringContaining("ttlHours"),
}),
);
});
});
¤ Dauer der Verarbeitung: 0.13 Sekunden
(vorverarbeitet am 2026-04-27)
¤
*© Formatika GbR, Deutschland