feat: add safe project upgrades and production performance fixes
This commit is contained in:
@@ -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"');
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user