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.

Make the escaped-link guard control explicit

pulse-triage[bot]1325b434fdf9
diff --git a/frontend-modern/src/components/shared/__tests__/settingsDocumentationLinkContract.test.ts b/frontend-modern/src/components/shared/__tests__/settingsDocumentationLinkContract.test.ts
index c6e97791a3..b2c9dd5b19 100644
--- a/frontend-modern/src/components/shared/__tests__/settingsDocumentationLinkContract.test.ts
+++ b/frontend-modern/src/components/shared/__tests__/settingsDocumentationLinkContract.test.ts
@@ -3,7 +3,7 @@ import ts from 'typescript';
import runtimeControlsSource from '@/components/Settings/AIRuntimeControlsSection.tsx?raw';
vi.mock('typescript', async (importOriginal) => {
- const actual = await importOriginal<typeof import('typescript')>();
+ const actual = await importOriginal<{ default: typeof ts }>();
return {
default: { ...actual.default, createSourceFile: vi.fn(actual.default.createSourceFile) },
};
@@ -26,7 +26,7 @@ describe('surviving settings documentation link contract', () => {
it.each([
'export const Link = () => <a href="/docs">Docs</a>;',
'export const Link = () => <\n a href="/docs">Docs</a>;',
- valid.replace('ExternalTextLink', 'External\\u0054extLink'),
+ String.raw`import { External\u0054extLink as Link } from './untrusted'; export const Section = () => <Link href="/docs">Docs</Link>;`,
'import { TERMS_DOC_URL as terms } from "@/utils/docsLinks"; export const Section = () => <p>No link</p>;',
])('still parses possible anchors, aliases and escaped bindings: %s', (source) => {
vi.mocked(ts.createSourceFile).mockClear();