Files
HealthLog/src/components/__tests__/error-details.test.tsx
T
Marc-André Bombeck de33f1ad4c chore: remove the bug-report integration
Drop the in-app bug-report surface end to end: the user submission page,
the feedback intake and admin inbox, the optional GitHub-issue
escalation, the operator config, and the dedicated achievement badges.

- delete the /bugreport page and the bugreport / feedback / admin-feedback API routes
- drop the Feedback model, its enums, and the AppSettings GitHub-issue and enable columns (migration 0205)
- remove the admin Feedback section, the Bug Report integration card, and the system-status row
- drop the bug-report nav entry and the app-settings provider that only carried its flag
- remove the bug-hunter achievement badges and their metric
- prune the related i18n keys across every locale and the encrypted-column and key-rotation registries
2026-06-27 20:37:35 +02:00

33 lines
985 B
TypeScript

import { describe, expect, it } from "vitest";
import { renderToStaticMarkup } from "react-dom/server";
// `<ErrorDetails>` is a client component used by every Next.js `error.tsx`
// boundary. It surfaces the error message plus a copy-to-clipboard diagnostic
// payload — and, since v1.23, no longer links out to a bug-report surface.
import { I18nProvider } from "@/lib/i18n/context";
import { ErrorDetails } from "../error-details";
function render() {
const error = Object.assign(new Error("test failure"), {
digest: "abc123",
});
return renderToStaticMarkup(
<I18nProvider initialLocale="en">
<ErrorDetails error={error} />
</I18nProvider>,
);
}
describe("<ErrorDetails>", () => {
it("renders the error message", () => {
const html = render();
expect(html).toContain("test failure");
});
it("does not link out to a bug-report surface", () => {
const html = render();
expect(html).not.toContain('href="/bugreport"');
});
});