fix: keep project entity selection and ignore placeholder hits

This commit is contained in:
muena
2026-09-26 15:09:53 +02:00
parent 5877b7cf5f
commit 6cb5b0efc5
5 changed files with 90 additions and 10 deletions

View File

@@ -53,6 +53,20 @@ describe("Velum-Projektstände", () => {
.toEqual([first.run.id, second.run.id].sort());
});
it("behält die Kategorieauswahl pro Projekt für den nächsten Lauf", async () => {
const root = await fs.mkdtemp(join(tmpdir(), "velum-entity-types-test-"));
roots.push(root);
const source = join(root, "Quelle");
const other = join(root, "Anderes Projekt");
const support = join(root, "Raycast");
await fs.mkdir(source);
await fs.mkdir(other);
expect(await project.loadProjectEntityTypes(source, support)).toBeNull();
await project.saveProjectEntityTypes(`${source}/`, ["PERSON", "ORG", "PERSON"], support);
expect(await project.loadProjectEntityTypes(source, support)).toEqual(["PERSON", "ORG"]);
expect(await project.loadProjectEntityTypes(other, support)).toBeNull();
});
it("ersetzt nur bestätigte Vorkommen und stellt Dateinamen wieder her", () => {
const hits = [
{ id: "a", start: 0, end: 3, placeholder: "PERSON_01" },