Group repeat pseudonymization runs by project path

This commit is contained in:
muena
2026-09-25 16:17:03 +02:00
parent c3ef1a6aed
commit 5877b7cf5f
4 changed files with 91 additions and 15 deletions

View File

@@ -36,6 +36,23 @@ describe("Velum-Projektstände", () => {
expect(await fs.readFile(join(source, "Notiz.txt"), "utf8")).toBe("Max Mustermann");
});
it("ordnet erneute Läufe demselben Projektpfad zu und erkennt ältere Pfadschreibweisen", async () => {
const root = await fs.mkdtemp(join(tmpdir(), "velum-project-identity-test-"));
roots.push(root);
const source = join(root, "Quelle");
const support = join(root, "Raycast");
await fs.mkdir(source);
const first = await project.createRun(`${source}/`, support);
first.run.projectPath = `${source}/`;
await project.saveRun(first.directory, first.run);
const second = await project.createRun(join(source, "."), support);
await project.saveRun(second.directory, second.run);
expect(project.projectDataRoot(source, support)).toBe(project.projectDataRoot(`${source}/`, support));
expect(first.run.id).not.toBe(second.run.id);
expect((await project.listRuns(source, support)).map(({ run }) => run.id).sort())
.toEqual([first.run.id, second.run.id].sort());
});
it("ersetzt nur bestätigte Vorkommen und stellt Dateinamen wieder her", () => {
const hits = [
{ id: "a", start: 0, end: 3, placeholder: "PERSON_01" },