mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2026-07-21 15:33:30 +10:00
24c882fa9f
Introduce createRtlStyleHelpers and a single rtl flag on RenderProvider, migrate every template page to mirrored layout styles, and rename alignRight to alignEnd. Fix plain rich text rendering via PdfText paragraph renderers and map legacy Times New Roman to Times-Roman. Co-authored-by: Cursor <cursoragent@cursor.com>
28 lines
920 B
TypeScript
28 lines
920 B
TypeScript
import { readFileSync } from "node:fs";
|
|
import { fileURLToPath } from "node:url";
|
|
import { describe, expect, it } from "vitest";
|
|
import { templateSchema } from "@reactive-resume/schema/templates";
|
|
|
|
const templatePages = templateSchema.options.map(
|
|
(template) =>
|
|
[
|
|
template,
|
|
fileURLToPath(new URL(`./templates/${template}/${capitalize(template)}Page.tsx`, import.meta.url)),
|
|
] as const,
|
|
);
|
|
|
|
function capitalize(template: string): string {
|
|
return template.charAt(0).toUpperCase() + template.slice(1);
|
|
}
|
|
|
|
describe("RTL PDF fixture", () => {
|
|
it.each(templatePages)("%s wires shared RTL helpers and alignEnd slot", (_template, pagePath) => {
|
|
const source = readFileSync(pagePath, "utf8");
|
|
|
|
expect(source).toContain("createRtlStyleHelpers");
|
|
expect(source).toContain("alignEnd");
|
|
expect(source).not.toContain("alignRight");
|
|
expect(source).not.toContain('from "@reactive-resume/utils/locale"');
|
|
});
|
|
});
|