Verkuerze die Inhaltsliste und fuehre Unterkapitel ein, damit Richtung, Bezuge und Struktur ohne Zusatzzeilen bedienbar bleiben.
Deploy Development / deploy (push) Successful in 29s
Test Suite / pytest-backend (push) Successful in 1m24s
Test Suite / smoke-dev (push) Successful in 0s
Test Suite / frontend-build (push) Successful in 9s

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
LarsandCursor committed 2026-10-17 21:13:21 +02:00
1 parent eeeb81148a
commit e4380261fc
30 files changed
+2384 -430

No files matched your search

+38
View File
@@ -0,0 +1,38 @@
import assert from "node:assert/strict";
import test from "node:test";
import { bezugCount, counterpartLabel, directionSymbol, partyLabel } from "./list-meta.mjs";
test("party names stay short and ignore address chains", () => {
assert.equal(partyLabel("Karin Vogel <karin.vogel@example.org>"), "Karin Vogel");
assert.equal(partyLabel('"Kanzlei Beispiel" <kanzlei@example.org>, Ablage <ablage@example.org>'), "Kanzlei Beispiel");
assert.equal(partyLabel("ablage@example.org"), "ablage");
});
test("incoming mail shows the sender and outgoing mail the recipient", () => {
const element = {
external: {
source: "imap",
detail: {
message_from: "Karin Vogel <karin.vogel@example.org>",
message_to: "Kanzlei Beispiel <kanzlei@example.org>",
},
},
};
assert.equal(counterpartLabel(element, "in"), "Karin Vogel");
assert.equal(counterpartLabel(element, "out"), "Kanzlei Beispiel");
assert.equal(counterpartLabel({ kind: "note" }, "local"), "");
});
test("direction symbols distinguish local, unspecified and the triangles", () => {
assert.equal(directionSymbol("in"), "communication-in");
assert.equal(directionSymbol("out"), "communication-out");
assert.equal(directionSymbol("local"), "communication-local");
assert.equal(directionSymbol(""), "communication-unspecified");
assert.equal(directionSymbol(null), "communication-unspecified");
});
test("bezug counts only readable disclosed counterparts", () => {
assert.equal(bezugCount({ refers_to: [{ id: "a" }], referred_by: [{ id: "b" }, { id: "c" }] }), 3);
assert.equal(bezugCount({}), 0);
assert.equal(bezugCount(null), 0);
});