feat: optionally sort translation mappings by creation date
This commit is contained in:
@@ -118,6 +118,22 @@ it("entfernt eine False-Positive-Gruppe aus der Sitzung und merkt alle Varianten
|
||||
]);
|
||||
});
|
||||
|
||||
it("bewahrt das Anlagedatum einer Sitzung beim Umklammern und Zusammenfassen", async () => {
|
||||
const session = await sessions.createSession("Zeitfolge");
|
||||
const first = await sessions.updateSessionMapping(session.id, {
|
||||
PERSON_01: { type: "PERSON", original: "Beispiel Eins" },
|
||||
});
|
||||
const created = first.mappingCreatedAt?.PERSON_01;
|
||||
expect(created).toBeTruthy();
|
||||
const next = await sessions.updateSessionMapping(session.id, {
|
||||
"<PERSON_01>": { type: "PERSON", original: "Beispiel Eins" },
|
||||
"<PERSON_02>": { type: "PERSON", original: "Beispiel Zwei", merged_into: "<PERSON_01>" },
|
||||
});
|
||||
expect(next.mappingCreatedAt?.["<PERSON_01>"]).toBe(created);
|
||||
expect(next.mappingCreatedAt?.["<PERSON_02>"]).toBeTruthy();
|
||||
expect(next.mappingCreatedAt?.PERSON_01).toBeUndefined();
|
||||
});
|
||||
|
||||
it("verlangt eine ausdrückliche Kontextwahl und legt ein Textprojekt nur einmal an", async () => {
|
||||
const root = await fs.mkdtemp(join(tmpdir(), "velum-text-context-"));
|
||||
roots.push(root);
|
||||
|
||||
Reference in New Issue
Block a user