feat: add safe project upgrades and production performance fixes

This commit is contained in:
2026-07-12 16:54:22 +05:30
parent a524c08126
commit 935b3103dd
68 changed files with 555 additions and 107 deletions
+13
View File
@@ -22,3 +22,16 @@ test("deduplicates runtime scripts and module preloads", () => {
expect(html.match(/rel="modulepreload"/g)).toHaveLength(1);
expect(html.match(/src="\/app\.js"/g)).toHaveLength(1);
});
test("always emits a document language and preserves an explicit language", () => {
const fallback = renderDocument({ meta: {}, body: "" });
expect(fallback).toContain('<html lang="en">');
const explicit = renderDocument({
meta: {},
body: "",
htmlAttrs: ' data-theme="dark" lang="fr"',
});
expect(explicit).toContain('<html data-theme="dark" lang="fr">');
expect(explicit).not.toContain('lang="en"');
});