mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2026-08-23 23:02:17 +10:00
fix: polish ai agent and command palette
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { buildAgentDraftResumeName, buildUniqueAgentDraftSlug } from "./resume";
|
||||
import { buildAgentDraftResumeName, buildUniqueAgentDraftSlug, normalizeAgentResumePatchOperations } from "./resume";
|
||||
|
||||
describe("agent resume setup helpers", () => {
|
||||
it("names duplicated resumes as AI drafts", () => {
|
||||
@@ -14,3 +14,25 @@ describe("agent resume setup helpers", () => {
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
describe("normalizeAgentResumePatchOperations", () => {
|
||||
it("prefixes shorthand standard section paths without touching custom section paths", () => {
|
||||
const result = normalizeAgentResumePatchOperations(
|
||||
{
|
||||
sections: {
|
||||
experience: {},
|
||||
education: {},
|
||||
},
|
||||
},
|
||||
[
|
||||
{ op: "replace", path: "/experience/items/0/description", value: "Updated" },
|
||||
{ op: "copy", from: "/education/items/0", path: "/customSections/0/items/-" },
|
||||
],
|
||||
);
|
||||
|
||||
expect(result).toEqual([
|
||||
{ op: "replace", path: "/sections/experience/items/0/description", value: "Updated" },
|
||||
{ op: "copy", from: "/sections/education/items/0", path: "/customSections/0/items/-" },
|
||||
]);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user