v5.2.0: undo/redo, version history, embedded AI assistant, mobile builder & more (#3205)

This commit is contained in:
Amruth Pillai
2026-07-04 14:57:25 +02:00
committed by GitHub
parent 09bc6ec521
commit 57e9c8c487
181 changed files with 46794 additions and 11348 deletions
@@ -0,0 +1,26 @@
import { describe, expect, it } from "vitest";
import { detectJsonImportType } from "./import";
describe("detectJsonImportType", () => {
it("detects JSON Resume by a top-level basics without Reactive Resume sections/metadata", () => {
expect(detectJsonImportType({ basics: { name: "A" }, work: [] })).toBe("json-resume-json");
});
it("detects the current Reactive Resume schema by metadata.page", () => {
expect(detectJsonImportType({ basics: {}, sections: {}, metadata: { page: { locale: "en-US" } } })).toBe(
"reactive-resume-json",
);
});
it("detects the legacy v4 schema by metadata without a page key", () => {
expect(detectJsonImportType({ basics: {}, sections: {}, metadata: { template: "azurill" } })).toBe(
"reactive-resume-v4-json",
);
});
it("returns an empty string for unrecognized shapes", () => {
expect(detectJsonImportType({ foo: "bar" })).toBe("");
expect(detectJsonImportType(null)).toBe("");
expect(detectJsonImportType("nope")).toBe("");
});
});