Route secondary doc renders through createGuideFixture in 3 doc tests

Completes createGuideFixture conversion for agentObserverGuide.test.ts,
recoveryBackupScopeDocs.test.ts, and temperatureFAQ.test.ts so secondary
cross-guide renders reuse the per-suite fixture cache instead of calling
removed renderDocMarkdown directly.

Contract-Neutral: Test-only fix completing fixture helper migration in three doc unit test files.
Change-source: pulse-maintainer
This commit is contained in:
pulse-triage[bot] committed 2026-11-29 03:09:10 +00:00
1 parent 0a6dd76faf
commit 3c8a1353ff
3 files changed
+4 -14

No files matched your search

@@ -70,8 +70,7 @@ describe('Agent observer trust and API-access choice', () => {
for (const [doc, anchor] of targets) {
const href = doc === 'UNIFIED_AGENT' ? `#${anchor}` : `/docs/${doc}#${anchor}`;
expect(section.querySelector(`a[href="${href}"]`)).not.toBeNull();
const article = document.createElement('article');
article.innerHTML = renderDocMarkdown(readDoc(doc), doc);
const article = renderGuide(doc);
expect(article.querySelector(`#${anchor}`)).not.toBeNull();
}
expect(readFileSync(path.join(frontendRoot, 'public/docs/UNIFIED_AGENT.md'), 'utf8')).toBe(
@@ -102,8 +102,7 @@ describe('Recovery backup scope guidance', () => {
['AUTO_UPDATE', 'what-an-update-snapshot-contains'],
]) {
expect(article.querySelector(`a[href="/docs/${name}#${anchor}"]`)).not.toBeNull();
const target = document.createElement('article');
target.innerHTML = renderDocMarkdown(readDoc(`${name}.md`), name);
const target = renderGuide(name);
expect(target.querySelector(`#${anchor}`)).not.toBeNull();
}
expect(article.querySelector('a[href="#where-to-look"]')).not.toBeNull();
@@ -65,11 +65,7 @@ describe('shipped temperature FAQ', () => {
'/docs/TEMPERATURE_MONITORING#recommended-pulse-agent-proxmox',
'/docs/TEMPERATURE_MONITORING',
]);
const guide = document.createElement('article');
guide.innerHTML = renderDocMarkdown(
readFileSync(path.join(servedDocs, 'TEMPERATURE_MONITORING.md'), 'utf8'),
'TEMPERATURE_MONITORING',
);
const guide = renderGuide('TEMPERATURE_MONITORING');
for (const link of links) {
const fragment = link.getAttribute('href')!.split('#')[1];
if (fragment) expect(guide.querySelector(`#${fragment}`)).not.toBeNull();
@@ -101,11 +97,7 @@ describe('shipped temperature FAQ', () => {
});
it('makes the existing extra-sensor view findable without promising battery alerts', () => {
const guide = document.createElement('article');
guide.innerHTML = renderDocMarkdown(
readFileSync(path.join(servedDocs, 'TEMPERATURE_MONITORING.md'), 'utf8'),
'TEMPERATURE_MONITORING',
);
const guide = renderGuide('TEMPERATURE_MONITORING');
const heading = guide.querySelector('#other-linux-sensors-and-fan-readings');
expect(heading).not.toBeNull();
const section = document.createElement('section');