Skip to content

armgit / Pulse

Public Imported from GitHub
0

Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.

Reuse exact shipped-guide fixtures in missing-data link checks

pulse-triage[bot]19093fad2e74
diff --git a/frontend-modern/src/features/docs/__tests__/missingDataFAQ.test.ts b/frontend-modern/src/features/docs/__tests__/missingDataFAQ.test.ts
index b594235ef9..00e26bb1c2 100644
--- a/frontend-modern/src/features/docs/__tests__/missingDataFAQ.test.ts
+++ b/frontend-modern/src/features/docs/__tests__/missingDataFAQ.test.ts
@@ -2,20 +2,18 @@ import { readFileSync } from 'node:fs';
import path from 'node:path';
import { fileURLToPath } from 'node:url';
import { describe, expect, it } from 'vitest';
-import { renderDocMarkdown } from '../docMarkdown';
+import { createGuideFixture } from './guideFixture';
const repoRoot = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '../../../../..');
-function renderGuide(name: string): HTMLElement {
+const renderGuide = createGuideFixture((name: string) => {
const input = process.env[`PULSE_${name}_GUIDE_TEST_INPUT`];
const source = readFileSync(
input ?? path.join(repoRoot, 'frontend-modern/public/docs', `${name}.md`),
'utf8',
);
- const article = document.createElement('article');
- article.innerHTML = renderDocMarkdown(source, name);
- return article;
-}
+ return source;
+});
function section(id: string): HTMLElement {
const heading = renderGuide('FAQ').querySelector(`#${id}`);