mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-14 22:50:51 +00:00
test: use render thunks in the read-error family suites for the jsx-key rule
This commit is contained in:
1 parent
edaa5bf424
commit
73b82f444e
2 files changed
+13
-13
No files matched your search
@@ -29,15 +29,15 @@ function render(node: React.ReactNode) {
|
||||
);
|
||||
}
|
||||
|
||||
const cases: Array<[string, React.ReactNode]> = [
|
||||
["RecentAuditPreview", <RecentAuditPreview />],
|
||||
["CoachFeedbackSection", <CoachFeedbackSection />],
|
||||
["AiQualitySection", <AiQualitySection />],
|
||||
const cases: Array<[string, () => React.ReactNode]> = [
|
||||
["RecentAuditPreview", () => <RecentAuditPreview />],
|
||||
["CoachFeedbackSection", () => <CoachFeedbackSection />],
|
||||
["AiQualitySection", () => <AiQualitySection />],
|
||||
];
|
||||
|
||||
describe("admin read-error family — a read failure is foreground and recoverable", () => {
|
||||
it.each(cases)("%s renders a query-error row with retry", (_name, node) => {
|
||||
const html = render(node);
|
||||
const html = render(node());
|
||||
expect(html).toContain('data-slot="query-error-row"');
|
||||
expect(html).toContain('data-slot="query-error-row-retry"');
|
||||
expect(html).not.toContain("bg-destructive/10");
|
||||
|
||||
Reference in new issue
Block a user