test: update renderer tests for i18n changes

Remove expectations for Lessons heading since it's now in
HTML rather than being added by renderModuleList()
This commit is contained in:
2025-12-30 15:12:04 +01:00
parent 24ea9b93ca
commit 8d7a0ab2c3

View File

@@ -30,10 +30,7 @@ describe("Renderer Module", () => {
renderModuleList(container, modules, onSelectModule, onSelectLesson); renderModuleList(container, modules, onSelectModule, onSelectLesson);
// Check if heading is created // Check if module headers are created (heading is now in HTML, not added by renderer)
expect(container.innerHTML).toContain("<h3>Lessons</h3>");
// Check if module headers are created
const moduleHeaders = container.querySelectorAll(".module-header"); const moduleHeaders = container.querySelectorAll(".module-header");
expect(moduleHeaders.length).toBe(2); expect(moduleHeaders.length).toBe(2);
@@ -46,7 +43,8 @@ describe("Renderer Module", () => {
const container = document.getElementById("module-list"); const container = document.getElementById("module-list");
renderModuleList(container, [], vi.fn(), vi.fn()); renderModuleList(container, [], vi.fn(), vi.fn());
expect(container.innerHTML).toContain("<h3>Lessons</h3>"); // Container should be empty (heading is now in HTML, not added by renderer)
expect(container.innerHTML).toBe("");
expect(container.querySelectorAll(".module-header").length).toBe(0); expect(container.querySelectorAll(".module-header").length).toBe(0);
}); });