Group repeat pseudonymization runs by project path
This commit is contained in:
@@ -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" },
|
||||
|
||||
Reference in New Issue
Block a user