From 92a3337aeb358e0b845e7d6ce22df8457eb7a732 Mon Sep 17 00:00:00 2001 From: adilallo <39313955+adilallo@users.noreply.github.com> Date: Wed, 10 Dec 2025 22:43:36 -0700 Subject: [PATCH] Fix tests after ts change --- __mocks__/styleMock.js | 3 ++ app/blog/page.tsx | 1 - app/components/AskOrganizer.tsx | 6 +-- app/components/Avatar.tsx | 2 +- app/components/AvatarContainer.tsx | 2 +- app/components/Button.tsx | 12 ++++- app/components/Checkbox.tsx | 2 +- app/components/ContentContainer.tsx | 2 +- app/components/ContentLockup.tsx | 2 +- app/components/ContentThumbnailTemplate.tsx | 4 +- app/components/ContextMenu.tsx | 2 +- app/components/ContextMenuDivider.tsx | 2 +- app/components/ContextMenuItem.tsx | 10 ++-- app/components/ContextMenuSection.tsx | 2 +- app/components/FeatureGrid.tsx | 4 +- app/components/Footer.tsx | 44 +++++++++++++--- app/components/Header.tsx | 6 +-- app/components/HeaderTab.tsx | 2 +- app/components/HeroBanner.tsx | 2 +- app/components/HomeHeader.tsx | 14 ++--- app/components/ImagePlaceholder.tsx | 2 +- app/components/Input.tsx | 19 ++++--- app/components/MenuBar.tsx | 2 +- app/components/MenuBarItem.tsx | 5 +- app/components/MiniCard.tsx | 2 +- app/components/NavigationItem.tsx | 5 +- app/components/NumberedCard.tsx | 2 +- app/components/NumberedCards.tsx | 2 +- app/components/QuoteBlock.tsx | 4 +- app/components/RadioButton.tsx | 2 +- app/components/RadioGroup.tsx | 2 +- app/components/RelatedArticles.tsx | 14 ++--- app/components/RuleCard.tsx | 4 +- app/components/RuleStack.tsx | 2 +- app/components/SectionHeader.tsx | 2 +- app/components/Select.tsx | 14 ++--- app/components/SelectDropdown.tsx | 2 +- app/components/SelectOption.tsx | 10 ++-- app/components/Switch.tsx | 18 ++++--- app/components/TextArea.tsx | 19 ++++--- app/components/Toggle.tsx | 22 ++++---- app/components/ToggleGroup.tsx | 18 ++++--- app/components/WebVitalsDashboard.tsx | 2 +- docs/assets/DocsRenderer-PQXLIZUC-CZs-lgH4.js | 10 ---- docs/assets/axe-kJbNpjRz.js | 26 ---------- docs/assets/iframe-D_aMTKb2.js | 35 ++----------- docs/assets/react-18-TXN0K6I-.js | 10 ---- .../manager-bundle.js | 2 - docs/sb-addons/onboarding-3/manager-bundle.js | 2 - .../common-manager-bundle.js | 3 -- docs/sb-manager/globals-runtime.js | 29 ----------- docs/sb-manager/runtime.js | 1 - docs/vite-inject-mocker-entry.js | 1 - lib/cache.ts | 5 +- lib/content.ts | 7 +-- lib/types.ts | 14 ++--- stories/Button.visual.stories.js | 2 +- stories/Footer.responsive.stories.js | 2 +- stories/Header.responsive.stories.js | 2 +- tests/integration/layout.integration.test.jsx | 52 ++++++++++--------- tests/unit/BlogPage.test.jsx | 5 +- tests/unit/Footer.test.jsx | 30 +++++------ tsconfig.json | 9 +++- vitest.config.mjs | 24 +++++++-- vitest.setup.ts | 6 ++- 65 files changed, 262 insertions(+), 313 deletions(-) create mode 100644 __mocks__/styleMock.js diff --git a/__mocks__/styleMock.js b/__mocks__/styleMock.js new file mode 100644 index 0000000..f7b01ba --- /dev/null +++ b/__mocks__/styleMock.js @@ -0,0 +1,3 @@ +// Mock CSS imports for tests +// This prevents jsdom from trying to parse Tailwind CSS v4 syntax +export default {}; diff --git a/app/blog/page.tsx b/app/blog/page.tsx index 56b125d..0cc02c4 100644 --- a/app/blog/page.tsx +++ b/app/blog/page.tsx @@ -1,6 +1,5 @@ import { getAllBlogPosts } from "../../lib/content"; import ContentThumbnailTemplate from "../components/ContentThumbnailTemplate"; -import ContentContainer from "../components/ContentContainer"; import type { Metadata } from "next"; export const metadata: Metadata = { diff --git a/app/components/AskOrganizer.tsx b/app/components/AskOrganizer.tsx index ec97761..ec49bdf 100644 --- a/app/components/AskOrganizer.tsx +++ b/app/components/AskOrganizer.tsx @@ -27,7 +27,7 @@ declare global { gtag?: ( command: string, eventName: string, - params?: Record + params?: Record, ) => void; } } @@ -45,7 +45,7 @@ const AskOrganizer = memo( }) => { // Analytics tracking for contact button clicks const handleContactClick = ( - event: React.MouseEvent + event: React.MouseEvent, ) => { // Track contact button interaction if (onContactClick) { @@ -139,7 +139,7 @@ const AskOrganizer = memo( ); - } + }, ); AskOrganizer.displayName = "AskOrganizer"; diff --git a/app/components/Avatar.tsx b/app/components/Avatar.tsx index 42a6401..e05694d 100644 --- a/app/components/Avatar.tsx +++ b/app/components/Avatar.tsx @@ -19,7 +19,7 @@ const Avatar = memo( const baseStyles = `rounded-[var(--radius-measures-radius-full)] object-cover ${sizeStyles[size]} ${className}`; return {alt}; - } + }, ); Avatar.displayName = "Avatar"; diff --git a/app/components/AvatarContainer.tsx b/app/components/AvatarContainer.tsx index aaedac9..5892d40 100644 --- a/app/components/AvatarContainer.tsx +++ b/app/components/AvatarContainer.tsx @@ -22,7 +22,7 @@ const AvatarContainer = memo( {children} ); - } + }, ); AvatarContainer.displayName = "AvatarContainer"; diff --git a/app/components/Button.tsx b/app/components/Button.tsx index 1621b7a..991bd14 100644 --- a/app/components/Button.tsx +++ b/app/components/Button.tsx @@ -2,12 +2,20 @@ import React, { memo } from "react"; interface ButtonProps extends React.ButtonHTMLAttributes { children: React.ReactNode; - variant?: "default" | "secondary" | "primary" | "outlined" | "dark" | "inverse"; + variant?: + | "default" + | "secondary" + | "primary" + | "outlined" + | "dark" + | "inverse"; size?: "xsmall" | "small" | "medium" | "large" | "xlarge"; className?: string; disabled?: boolean; type?: "button" | "submit" | "reset"; - onClick?: (e: React.MouseEvent) => void; + onClick?: ( + e: React.MouseEvent, + ) => void; href?: string; target?: string; rel?: string; diff --git a/app/components/Checkbox.tsx b/app/components/Checkbox.tsx index 1487bcb..7e8b4d1 100644 --- a/app/components/Checkbox.tsx +++ b/app/components/Checkbox.tsx @@ -178,7 +178,7 @@ const Checkbox = memo( /> ); - } + }, ); Checkbox.displayName = "Checkbox"; diff --git a/app/components/ContentContainer.tsx b/app/components/ContentContainer.tsx index 4e11b40..c4a03bd 100644 --- a/app/components/ContentContainer.tsx +++ b/app/components/ContentContainer.tsx @@ -130,7 +130,7 @@ const ContentContainer = memo( ); - } + }, ); ContentContainer.displayName = "ContentContainer"; diff --git a/app/components/ContentLockup.tsx b/app/components/ContentLockup.tsx index b98ae66..87f8dd2 100644 --- a/app/components/ContentLockup.tsx +++ b/app/components/ContentLockup.tsx @@ -203,7 +203,7 @@ const ContentLockup = memo( )} ); - } + }, ); ContentLockup.displayName = "ContentLockup"; diff --git a/app/components/ContentThumbnailTemplate.tsx b/app/components/ContentThumbnailTemplate.tsx index ef13965..817cca1 100644 --- a/app/components/ContentThumbnailTemplate.tsx +++ b/app/components/ContentThumbnailTemplate.tsx @@ -22,7 +22,7 @@ const ContentThumbnailTemplate = memo( // Get article-specific background image from frontmatter const getBackgroundImage = ( post: BlogPost, - variant: "vertical" | "horizontal" + variant: "vertical" | "horizontal", ): string => { // Check if post has thumbnail images defined in frontmatter if (post.frontmatter?.thumbnail) { @@ -98,7 +98,7 @@ const ContentThumbnailTemplate = memo( ); - } + }, ); ContentThumbnailTemplate.displayName = "ContentThumbnailTemplate"; diff --git a/app/components/ContextMenu.tsx b/app/components/ContextMenu.tsx index 03af1c7..5d151c3 100644 --- a/app/components/ContextMenu.tsx +++ b/app/components/ContextMenu.tsx @@ -33,7 +33,7 @@ const ContextMenu = forwardRef( {children} ); - } + }, ); ContextMenu.displayName = "ContextMenu"; diff --git a/app/components/ContextMenuDivider.tsx b/app/components/ContextMenuDivider.tsx index a8d2c1c..5ac793b 100644 --- a/app/components/ContextMenuDivider.tsx +++ b/app/components/ContextMenuDivider.tsx @@ -19,7 +19,7 @@ const ContextMenuDivider = forwardRef( return (
); - } + }, ); ContextMenuDivider.displayName = "ContextMenuDivider"; diff --git a/app/components/ContextMenuItem.tsx b/app/components/ContextMenuItem.tsx index 5c5dec7..5d692f0 100644 --- a/app/components/ContextMenuItem.tsx +++ b/app/components/ContextMenuItem.tsx @@ -9,7 +9,7 @@ interface ContextMenuItemProps extends React.HTMLAttributes { disabled?: boolean; className?: string; onClick?: ( - e: React.MouseEvent | React.KeyboardEvent + e: React.MouseEvent | React.KeyboardEvent, ) => void; size?: "small" | "medium" | "large"; } @@ -26,7 +26,7 @@ const ContextMenuItem = forwardRef( size = "medium", ...props }, - ref + ref, ) => { const getTextSize = (): string => { switch (size) { @@ -69,7 +69,7 @@ const ContextMenuItem = forwardRef( onClick(e); } }, - [disabled, onClick] + [disabled, onClick], ); const handleKeyDown = useCallback( @@ -81,7 +81,7 @@ const ContextMenuItem = forwardRef( } } }, - [disabled, onClick] + [disabled, onClick], ); return ( @@ -131,7 +131,7 @@ const ContextMenuItem = forwardRef( )}
); - } + }, ); ContextMenuItem.displayName = "ContextMenuItem"; diff --git a/app/components/ContextMenuSection.tsx b/app/components/ContextMenuSection.tsx index 789f687..127e5f4 100644 --- a/app/components/ContextMenuSection.tsx +++ b/app/components/ContextMenuSection.tsx @@ -28,7 +28,7 @@ const ContextMenuSection = forwardRef( {children} ); - } + }, ); ContextMenuSection.displayName = "ContextMenuSection"; diff --git a/app/components/FeatureGrid.tsx b/app/components/FeatureGrid.tsx index 4b39450..b9532a6 100644 --- a/app/components/FeatureGrid.tsx +++ b/app/components/FeatureGrid.tsx @@ -48,7 +48,7 @@ const FeatureGrid = memo( href: "#conflict-resolution", }, ], - [] + [], ); return (
(
); - } + }, ); FeatureGrid.displayName = "FeatureGrid"; diff --git a/app/components/Footer.tsx b/app/components/Footer.tsx index aeaf386..e5e84ba 100644 --- a/app/components/Footer.tsx +++ b/app/components/Footer.tsx @@ -1,4 +1,5 @@ import React, { memo } from "react"; +import Link from "next/link"; import Logo from "./Logo"; import Separator from "./Separator"; import { getAssetPath, ASSETS } from "../../lib/assetUtils"; @@ -103,27 +104,54 @@ const Footer = memo(() => { {/* Links Section */} + {/* Legal Links */} +
+ + Privacy Policy + + + Terms of Service + + + Cookies Settings + +
+ {/* Copyright */}
- © {new Date().getFullYear()} Media Economies Design Lab. All rights - reserved. + © All right reserved
diff --git a/app/components/Header.tsx b/app/components/Header.tsx index 8bb6b15..70fbe1e 100644 --- a/app/components/Header.tsx +++ b/app/components/Header.tsx @@ -75,7 +75,7 @@ const Header = memo(() => { const renderAvatarGroup = ( containerSize: "small" | "medium" | "large" | "xlarge", - avatarSize: "small" | "medium" | "large" | "xlarge" + avatarSize: "small" | "medium" | "large" | "xlarge", ) => { return ( @@ -102,7 +102,7 @@ const Header = memo(() => { const renderCreateRuleButton = ( buttonSize: string, containerSize: "small" | "medium" | "large" | "xlarge", - avatarSize: "small" | "medium" | "large" | "xlarge" + avatarSize: "small" | "medium" | "large" | "xlarge", ) => { return ( ); - }) + }), ); ToggleGroup.displayName = "ToggleGroup"; diff --git a/app/components/WebVitalsDashboard.tsx b/app/components/WebVitalsDashboard.tsx index b1de767..272e766 100644 --- a/app/components/WebVitalsDashboard.tsx +++ b/app/components/WebVitalsDashboard.tsx @@ -116,7 +116,7 @@ const WebVitalsDashboard = memo(() => { }, })); }); - } + }, ); } }, []); diff --git a/docs/assets/DocsRenderer-PQXLIZUC-CZs-lgH4.js b/docs/assets/DocsRenderer-PQXLIZUC-CZs-lgH4.js index f0d1eab..f533007 100644 --- a/docs/assets/DocsRenderer-PQXLIZUC-CZs-lgH4.js +++ b/docs/assets/DocsRenderer-PQXLIZUC-CZs-lgH4.js @@ -8691,7 +8691,6 @@ function $b(e, t) { --t && Ze() && !(De < 48 || De > 102 || (De > 57 && De < 65) || (De > 70 && De < 97)); - ); return io(e, Lo() + (t < 6 && Dt() == 32 && Ze() == 32)); } @@ -8747,7 +8746,6 @@ function No(e, t, r, n, o, a, i, l, s) { A = n, S = w; x; - ) switch (((g = C), (C = Ze()))) { case 40: @@ -8934,7 +8932,6 @@ var wD = P(function (e, t, r) { for ( var n = 0, o = 0; (n = o), (o = Dt()), n === 38 && o === 12 && (t[r] = 1), !Un(o); - ) Ze(); return io(e, Je); @@ -8972,7 +8969,6 @@ var wD = P(function (e, t, r) { r = e.parent, n = e.column === r.column && e.line === r.line; r.type !== "rule"; - ) if (((r = r.parent), !r)) return; if ( @@ -12469,7 +12465,6 @@ function H1(e, t, r, n, o, a, i, l, s) { f++; }, "_loop"); f < d.length; - ) v(); if (c !== d.length - 1) { @@ -13261,7 +13256,6 @@ var q1, for ( var i = o || "", l = a || "div", s = {}, u = 0, d, p, c; u < i.length; - ) ((r.lastIndex = u), (c = r.exec(i)), @@ -13304,7 +13298,6 @@ var q1, for ( var l = [], s = String(i || n), u = s.indexOf(t), d = 0, p = !1, c; !p; - ) (u === -1 && ((u = s.length), (p = !0)), (c = s.slice(d, u).trim()), @@ -13760,7 +13753,6 @@ var q1, We--, be++; ++We < be; - ) if ( (bt === f && (Ce = ke[pr] || 1), (bt = H.charCodeAt(We)), bt === x) @@ -13794,7 +13786,6 @@ var q1, Ap = I[qt], Ie--; ++Ie < be && ((Ae = H.charCodeAt(Ie)), !!Ap(Ae)); - ) ((Me += u(Ae)), qt === D && s.call(r, Me) && ((Ve = Me), (Pr = r[Me]))); @@ -14769,7 +14760,6 @@ var q1, for ( L = _[I], L = typeof L == "string" ? [L] : L, j = L.length, B = -1; ++B < j; - ) k[L[B]] = k[I]; } diff --git a/docs/assets/axe-kJbNpjRz.js b/docs/assets/axe-kJbNpjRz.js index dae0b3c..fa12f23 100644 --- a/docs/assets/axe-kJbNpjRz.js +++ b/docs/assets/axe-kJbNpjRz.js @@ -1332,7 +1332,6 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho I = R.next(), b = 0; !I.done; - ) ((S = h ? d.call(h, v, I.value, b) : I.value), g ? ((f.value = S), p(w, b, f)) : (w[b] = S), @@ -1772,7 +1771,6 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho for ( s = c[1][d], c[0].splice(d, 1), c[1].splice(d, 1); !c[0].length && m.length; - ) ((d = m.pop()), (c = m.pop()), @@ -1853,7 +1851,6 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho for ( l = d[1][f], d[0].splice(f, 1), d[1].splice(f, 1); !d[0].length && p.length; - ) ((f = p.pop()), (d = p.pop()), @@ -2705,7 +2702,6 @@ Consider to rely on 'then' or 'done' mode instead.`); ` || c === "\r" || c === "\f"; - ) ((b = !0), n++, (c = a.charAt(n))); return b; @@ -2750,7 +2746,6 @@ Consider to rely on 'then' or 'done' mode instead.`); p(), (c = a.charAt(n)), !(n >= l || c === "," || c === ")")); - ) if (u[c]) { var _ = c; @@ -3728,7 +3723,6 @@ Consider to rely on 'then' or 'done' mode instead.`); xe = be.join(""), Me = []; xe.length; - ) (Me.push(parseInt(xe.substring(0, 8), 2)), (xe = xe.substring(8))); @@ -5058,7 +5052,6 @@ Consider to rely on 'then' or 'done' mode instead.`); _ = [], F; D > w; - ) ((F = g[w++]), (!r || (b ? F in v : l(v, F))) && @@ -5275,7 +5268,6 @@ Consider to rely on 'then' or 'done' mode instead.`); for ( var c = i(l), d = o(l), f = d.length, p = 0, m; f > p; - ) a.f(s, (m = d[p++]), c[m]); return s; @@ -6666,7 +6658,6 @@ Consider to rely on 'then' or 'done' mode instead.`); i = "", o = t.charCodeAt(0); ++a < r; - ) { if (((n = t.charCodeAt(a)), n == 0)) { i += "�"; @@ -6956,12 +6947,10 @@ Consider to rely on 'then' or 'done' mode instead.`); o.children.length && (a.push(r), (r = o.children.slice())); !r.length && a.length; - ) r = a.pop(); }; r.length; - ) n(); return t; @@ -7546,7 +7535,6 @@ Consider to rely on 'then' or 'done' mode instead.`); for ( var n = Array.isArray(t), i = n ? t[r] : t, o = ul(e, i); !o && a && e.parent; - ) ((e = e.parent), (o = ul(e, i))); if (r > 0) { @@ -7677,7 +7665,6 @@ Consider to rely on 'then' or 'done' mode instead.`); n < 16 && (t[a + n++] = pl[i]); }); n < 16; - ) t[a + n++] = 0; return t; @@ -9119,7 +9106,6 @@ Consider to rely on 'then' or 'done' mode instead.`); ), u = r ? o.nextNode() : o.currentNode; u; - ) { var s = le(u); (s && s.parent @@ -9534,7 +9520,6 @@ Consider to rely on 'then' or 'done' mode instead.`); a.shadowId === r.shadowId && !i && (n.push(a), a.props.nodeName !== "legend"); - ) { if (a._inDisabledFieldset !== void 0) { i = a._inDisabledFieldset; @@ -9648,7 +9633,6 @@ Consider to rely on 'then' or 'done' mode instead.`); !o.find(function (v) { return v.root === i.getRootNode(); }); - ) i = i.getRootNode().host; if ( @@ -15010,7 +14994,6 @@ Consider to rely on 'then' or 'done' mode instead.`); h = p, v = bt(d, c); v - h > m; - ) { var g = Ta(d); g = ir(g, { space: i, method: "clip" }); @@ -16253,7 +16236,6 @@ Consider to rely on 'then' or 'done' mode instead.`); return Math.max(I, N); }, 0); b > o; - ) { b = 0; for (var D = 1; D < v.length && v.length < d; D++) { @@ -19034,7 +19016,6 @@ See: https://github.com/dequelabs/axe-core/blob/master/doc/context.md`, for ( L.head.appendChild(a); (o = L.elementFromPoint(n, i)) && l.indexOf(o) === -1; - ) (l.push(o), c.push({ @@ -19048,7 +19029,6 @@ See: https://github.com/dequelabs/axe-core/blob/master/doc/context.md`, l.push(L.documentElement)), u = c.length; (s = c[--u]); - ) l[u].style.setProperty( t, @@ -19088,7 +19068,6 @@ See: https://github.com/dequelabs/axe-core/blob/master/doc/context.md`, o = q1(i, t, null, e[0].shadowId, a.pop()), u = []; o.vNodesIndex < o.vNodes.length; - ) { for ( var s, @@ -19151,7 +19130,6 @@ See: https://github.com/dequelabs/axe-core/blob/master/doc/context.md`, c.children.length && (n.push(o), (o = q1(c.children, f, d, c.shadowId, a.pop()))); o.vNodesIndex === o.vNodes.length && n.length; - ) (a.push(o), (o = n.pop())); } @@ -32224,7 +32202,6 @@ See: https://github.com/dequelabs/axe-core/blob/master/doc/context.md`, r.parent && !r.parent._hasRegionDescendant && r.parent.actualNode !== L.body; - ) r = r.parent; return r; @@ -32327,7 +32304,6 @@ See: https://github.com/dequelabs/axe-core/blob/master/doc/context.md`, for ( var t = e, r = e.textContent.trim(), a = r; a === r && t !== void 0; - ) { var n = -1; if (((e = t), e.children.length === 0)) return e; @@ -34252,7 +34228,6 @@ See: https://github.com/dequelabs/axe-core/blob/master/doc/context.md`, return !er(u); })); r; - ) (r.nodeName.toUpperCase() === "LABEL" && n.indexOf(r) === -1 && @@ -35367,7 +35342,6 @@ See: https://github.com/dequelabs/axe-core/blob/master/doc/context.md`, } }; (r = n.shift()); - ) i(); return a; diff --git a/docs/assets/iframe-D_aMTKb2.js b/docs/assets/iframe-D_aMTKb2.js index 967f77f..cf18815 100644 --- a/docs/assets/iframe-D_aMTKb2.js +++ b/docs/assets/iframe-D_aMTKb2.js @@ -7995,7 +7995,6 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho c = "", d = o.charCodeAt(0); ++u < i; - ) { if (((l = o.charCodeAt(u)), l == 0)) { c += "�"; @@ -15710,7 +15709,6 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho for ( var d = l.length, p = "", f = 0, h = 0, m = c, y = r; c > -1 && c < d; - ) { var b = u(l[c + 1], 4), g = u(l[c + 2], 0), @@ -18394,7 +18392,6 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho for ( var P = _; P < x.length - 1 && x[P].charCodeAt(1) + 1 === x[P + 1].charCodeAt(1); - ) P += 1; var D = 1 + P - _; @@ -20086,7 +20083,6 @@ var rg = Mt("warn"), for ( r.push(t[0].replace(n, "%c").replace(a, "%c")); (o = n.exec(t[0])); - ) (r.push(o[2]), r.push("")); for (let i = 1; i < t.length; i++) r.push(t[i]); @@ -31017,7 +31013,6 @@ function Fr(e, t) { for ( var a = GT(n.length), o = em(r) ? Object(new r(a)) : new Array(a), i = 0, u; i < a; - ) ((u = n[i]), t ? (o[i] = t(u, i)) : (o[i] = u), (i += 1)); return ((o.length = a), o); @@ -33355,7 +33350,6 @@ function gD() { k = 0, I = !1; _ < D; - ) { switch (((L = Q[Q.length - 1]), L.tag)) { case "JS": @@ -36166,7 +36160,6 @@ function Ir(e, t) { for ( var a = pF(n.length), o = xm(r) ? Object(new r(a)) : new Array(a), i = 0, u; i < a; - ) ((u = n[i]), t ? (o[i] = t(u, i)) : (o[i] = u), (i += 1)); return ((o.length = a), o); @@ -41431,7 +41424,6 @@ function w0(e, t, r = !0) { t === void 0 ? n >= (r ? Math.max(e.childNodes.length - 1, 0) : 0) : n <= e.childNodes.length; - ) { if (t && n === e.childNodes.length) throw new Error("The given offset is out of bounds."); @@ -49723,7 +49715,6 @@ var Ld = Se({ for ( ; (b = y.exec(u)) && (!c || c.index + c[0].length !== u.length); - ) ((!c || b.index + b[0].length !== c.index + c[0].length) && (c = b), @@ -50727,9 +50718,8 @@ async function Uq( ) { let { renderElement: i, unmountElement: u } = await jt( async () => { - const { renderElement: f, unmountElement: h } = await import( - "./react-18-TXN0K6I-.js" - ); + const { renderElement: f, unmountElement: h } = + await import("./react-18-TXN0K6I-.js"); return { renderElement: f, unmountElement: h }; }, __vite__mapDeps([34, 3]), @@ -55349,7 +55339,6 @@ var KM = $((...e) => { E.push(new f(w, null, null, null)), _.push(new f(null, null, null, null)); E.length; - ) { if (((P = E.pop()), P === Q)) { if ( @@ -55414,7 +55403,6 @@ var KM = $((...e) => { E.push(L), _.push(L); E.length; - ) { if (((L = E.pop()), L === W)) { if ( @@ -55512,7 +55500,6 @@ var KM = $((...e) => { var T; L < _.length && ((T = _[L]), !(T.extendedRange[1] > q.range[0])); - ) T.extendedRange[1] === q.range[0] ? (q.leadingComments || (q.leadingComments = []), @@ -55530,7 +55517,6 @@ var KM = $((...e) => { var T; L < _.length && ((T = _[L]), !(q.range[1] < T.extendedRange[0])); - ) q.range[1] === T.extendedRange[0] ? (q.trailingComments || (q.trailingComments = []), @@ -56656,7 +56642,6 @@ var KM = $((...e) => { for ( var g = y.originalColumn; y && y.originalLine === p && y.originalColumn == g; - ) (h.push({ line: t.getArg(y, "generatedLine", null), @@ -56784,7 +56769,6 @@ var KM = $((...e) => { F, L; x < v; - ) if (d.charAt(x) === ";") (f++, x++, (h = 0)); else if (d.charAt(x) === ",") x++; @@ -57569,7 +57553,6 @@ var KM = $((...e) => { (O = +(O.slice(0, j) + O.slice(j + 1)) + "")), de = 0; O.charCodeAt(O.length + de - 1) === 48; - ) --de; return ( @@ -57770,7 +57753,6 @@ var KM = $((...e) => { for ( de = j[O], le = 0; le < de.length && i.code.isWhiteSpace(de.charCodeAt(le)); - ) ++le; me > le && (me = le); @@ -60583,7 +60565,6 @@ var Qs, this.expect(U.braceL), e && this.enterScope(0); this.type !== U.braceR; - ) { var n = this.parseStatement(null); t.body.push(n); @@ -61502,7 +61483,6 @@ var Qs, this.potentialArrowAt === e.start, o = !1; ; - ) { var i = this.parseSubscript(e, t, r, n, a, o); if ( @@ -62881,7 +62861,6 @@ var Qs, for ( e.lastStringValue += Ys(e.lastIntValue); this.regexp_eatRegExpIdentifierPart(e); - ) e.lastStringValue += Ys(e.lastIntValue); return !0; @@ -63305,7 +63284,6 @@ var Qs, r = this.options.onComment && this.curPosition(), n = this.input.charCodeAt((this.pos += e)); this.pos < this.input.length && !io(n); - ) n = this.input.charCodeAt(++this.pos); this.options.onComment && @@ -63863,7 +63841,6 @@ var Qs, for ( var e = "", t = !0, r = this.pos, n = this.options.ecmaVersion >= 6; this.pos < this.input.length; - ) { var a = this.fullCharCodeAtPos(); if (ha(a, n)) this.pos += a <= 65535 ? 1 : 2; @@ -64407,7 +64384,6 @@ var Qs, !c.allowNamespacedObjects && this.unexpected(); this.eat(h.dot); - ) { let P = this.startNodeAt(C, E); ((P.object = _), @@ -64479,7 +64455,6 @@ var Qs, for ( P && (_.name = P); this.type !== h.slash && this.type !== m.jsxTagEnd; - ) _.attributes.push(this.jsx_parseAttribute()); return ( @@ -70025,7 +70000,6 @@ function VB() { return K; }; E < g.length; - ) { var L = P("CHAR"), q = P("NAME"), @@ -75268,9 +75242,8 @@ var R1 = !1, ) { if (!R1) { let { toHaveNoViolations: p } = await jt(async () => { - const { toHaveNoViolations: f } = await import( - "./matchers-7Z3WT2CE-CcSi9QFY.js" - ); + const { toHaveNoViolations: f } = + await import("./matchers-7Z3WT2CE-CcSi9QFY.js"); return { toHaveNoViolations: f }; }, []); (S1.extend({ toHaveNoViolations: p }), (R1 = !0)); diff --git a/docs/assets/react-18-TXN0K6I-.js b/docs/assets/react-18-TXN0K6I-.js index 61c0ff8..77b4717 100644 --- a/docs/assets/react-18-TXN0K6I-.js +++ b/docs/assets/react-18-TXN0K6I-.js @@ -123,7 +123,6 @@ function zd() { for ( Ua(g), Tl = K(Jl); Tl !== null && !(Tl.expirationTime > g && ye()); - ) { var p = Tl.callback; if (typeof p == "function") { @@ -1059,7 +1058,6 @@ function Ad() { for ( e = t = 0; t < i.length && !i[t].includes("DetermineComponentFrameRoot"); - ) t++; for (; e < d.length && !d[e].includes("DetermineComponentFrameRoot"); ) @@ -1068,7 +1066,6 @@ function Ad() { for ( t = i.length - 1, e = d.length - 1; 1 <= t && 0 <= e && i[t] !== d[e]; - ) e--; for (; 1 <= t && 0 <= e; t--, e--) @@ -5220,7 +5217,6 @@ Error generating stack: ` + for ( l = a.child, u = Ca(l, l.pendingProps), a.child = u, u.return = a; l.sibling !== null; - ) ((l = l.sibling), (u = u.sibling = Ca(l, l.pendingProps)), @@ -5368,7 +5364,6 @@ Error generating stack: ` + u = k0(a, null, t, u), a.child = u; u; - ) ((u.flags = (u.flags & -3) | 4096), (u = u.sibling)); } @@ -5696,7 +5691,6 @@ Error generating stack: ` + for ( l.sibling.return = l.return, l = l.sibling; l.tag !== 5 && l.tag !== 6 && l.tag !== 18; - ) { if ( (l.tag === 27 && wa(l.type)) || @@ -5799,7 +5793,6 @@ Error generating stack: ` + T !== n || (t !== 0 && T.nodeType !== 3) || (i = f + t), T.nodeType === 3 && (f += T.nodeValue.length), (m = T.firstChild) !== null; - ) ((s = T), (T = m)); for (;;) { @@ -5822,7 +5815,6 @@ Error generating stack: ` + for ( qc = { focusedElem: l, selectionRange: u }, on = !1, yl = a; yl !== null; - ) if ( ((a = yl), (l = a.child), (a.subtreeFlags & 1024) !== 0 && l !== null) @@ -7545,7 +7537,6 @@ Error generating stack: ` + l = u, u = a.child; u !== null; - ) (X1(u, l), (u = u.sibling)); return (Z(nl, (nl.current & 1) | 2), a.child); @@ -8650,7 +8641,6 @@ Error generating stack: ` + e = l.expirationTimes, n = l.pendingLanes & -62914561; 0 < n; - ) { var f = 31 - Nl(n), c = 1 << f, diff --git a/docs/sb-addons/chromatic-com-storybook-1/manager-bundle.js b/docs/sb-addons/chromatic-com-storybook-1/manager-bundle.js index e337a7a..774a590 100644 --- a/docs/sb-addons/chromatic-com-storybook-1/manager-bundle.js +++ b/docs/sb-addons/chromatic-com-storybook-1/manager-bundle.js @@ -16781,7 +16781,6 @@ try { for ( var t = bn(10) ? document.body : null, n = e.offsetParent || null; n === t && e.nextElementSibling; - ) n = (e = e.nextElementSibling).offsetParent; var r = n && n.nodeName; @@ -18136,7 +18135,6 @@ try { r = new DataView(t.buffer), i = e.byteLength; i--; - ) if (n.getUint8(i) !== r.getUint8(i)) return !1; return !0; diff --git a/docs/sb-addons/onboarding-3/manager-bundle.js b/docs/sb-addons/onboarding-3/manager-bundle.js index ffd3eb4..c73576e 100644 --- a/docs/sb-addons/onboarding-3/manager-bundle.js +++ b/docs/sb-addons/onboarding-3/manager-bundle.js @@ -1457,7 +1457,6 @@ try { for ( var t = Xe(10) ? document.body : null, n = e.offsetParent || null; n === t && e.nextElementSibling; - ) n = (e = e.nextElementSibling).offsetParent; var r = n && n.nodeName; @@ -2457,7 +2456,6 @@ try { r = new DataView(t.buffer), o = e.byteLength; o--; - ) if (n.getUint8(o) !== r.getUint8(o)) return !1; return !0; diff --git a/docs/sb-addons/storybook-core-server-presets-0/common-manager-bundle.js b/docs/sb-addons/storybook-core-server-presets-0/common-manager-bundle.js index 31683fe..d1f4e39 100644 --- a/docs/sb-addons/storybook-core-server-presets-0/common-manager-bundle.js +++ b/docs/sb-addons/storybook-core-server-presets-0/common-manager-bundle.js @@ -1702,7 +1702,6 @@ This is deprecated and won't work in Storybook 8 anymore. for ( var d = l.length, m = "", p = 0, f = 0, g = u, y = r; u > -1 && u < d; - ) { var E = s(l[u + 1], 4), b = s(l[u + 2], 0), @@ -4407,7 +4406,6 @@ This is deprecated and won't work in Storybook 8 anymore. var P = B; P < S.length - 1 && S[P].charCodeAt(1) + 1 === S[P + 1].charCodeAt(1); - ) P += 1; var L = 1 + P - B; @@ -21503,7 +21501,6 @@ ${S.description}`); var P = B; P < S.length - 1 && S[P].charCodeAt(1) + 1 === S[P + 1].charCodeAt(1); - ) P += 1; var L = 1 + P - B; diff --git a/docs/sb-manager/globals-runtime.js b/docs/sb-manager/globals-runtime.js index 20a43c1..e674910 100644 --- a/docs/sb-manager/globals-runtime.js +++ b/docs/sb-manager/globals-runtime.js @@ -569,7 +569,6 @@ var T9 = R((Ge) => { for ( rC(t), kn = Eo(aa); kn !== null && (!(kn.expirationTime > t) || (e && !P9())); - ) { var n = kn.callback; if (typeof n == "function") { @@ -1076,7 +1075,6 @@ al vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mod s = o.length - 1, l = i.length - 1; 1 <= s && 0 <= l && o[s] !== i[l]; - ) l--; for (; 1 <= s && 0 <= l; s--, l--) @@ -1496,7 +1494,6 @@ al vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mod p0.innerHTML = "" + t.valueOf().toString() + "", t = p0.firstChild; e.firstChild; - ) e.removeChild(e.firstChild); for (; t.firstChild; ) e.appendChild(t.firstChild); @@ -2022,7 +2019,6 @@ al vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mod o = e.expirationTimes, i = e.pendingLanes; 0 < i; - ) { var s = 31 - _o(i), l = 1 << s, @@ -3989,7 +3985,6 @@ _reactEvents$" + Zu, for ( e = e.return; e !== null && e.tag !== 5 && e.tag !== 3 && e.tag !== 13; - ) e = e.return; gn = e; @@ -6251,7 +6246,6 @@ on" && for ( e = t.child, r = Li(e, e.pendingProps), t.child = r, r.return = t; e.sibling !== null; - ) ((e = e.sibling), (r = r.sibling = Li(e, e.pendingProps)), @@ -6803,7 +6797,6 @@ oll", n = r, r = t.child; r !== null; - ) ((i = r), (e = n), @@ -7006,7 +6999,6 @@ oll", f !== i || (n !== 0 && f.nodeType !== 3) || (u = s + n), f.nodeType === 3 && (s += f.nodeValue.length), (m = f.firstChild) !== null; - ) ((p = f), (f = m)); for (;;) { @@ -7029,7 +7021,6 @@ oll", for ( JC = { focusedElem: e, selectionRange: r }, V0 = !1, ae = t; ae !== null; - ) if ( ((t = ae), (e = t.child), (t.subtreeFlags & 1028) !== 0 && e !== null) @@ -7167,7 +7158,6 @@ oll", for ( e.sibling.return = e.return, e = e.sibling; e.tag !== 5 && e.tag !== 6 && e.tag !== 18; - ) { if (e.flags & 2 || e.child === null || e.tag === 4) continue e; ((e.child.return = e), (e = e.child)); @@ -8083,7 +8073,6 @@ oll", e.pingedLanes &= ~t, e = e.expirationTimes; 0 < t; - ) { var r = 31 - _o(t), n = 1 << r; @@ -8782,7 +8771,6 @@ oll", r = Dk(t, null, n, r), t.child = r; r; - ) ((r.flags = (r.flags & -3) | 4096), (r = r.sibling)); else { @@ -9783,7 +9771,6 @@ var zge, for ( r.push(t[0].replace(n, "%c").replace(o, "%c")); (i = n.exec(t[0])); - ) (r.push(i[2]), r.push("")); for (let s = 1; s < t.length; s++) r.push(t[s]); @@ -10076,7 +10063,6 @@ function xD(e, t) { --t && Fr() && !(Mt < 48 || Mt > 102 || (Mt > 57 && Mt < 65) || (Mt > 70 && Mt < 97)); - ); return vc(e, dp() + (t < 6 && zn() == 32 && Fr() == 32)); } @@ -10160,7 +10146,6 @@ function Dg(e, t, r, n, o, i, s, l, u) { C = n, _ = E; b; - ) switch (((v = w), (w = Fr()))) { // ( @@ -10621,7 +10606,6 @@ var obe, for ( var o = 0, i = 0; (o = i), (i = zn()), o === 38 && i === 12 && (r[n] = 1), !hc(i); - ) Fr(); return vc(t, Dr); @@ -10668,7 +10652,6 @@ var obe, n = t.parent, o = t.column === n.column && t.line === n.line; n.type !== "rule"; - ) if (((n = n.parent), !n)) return; if ( @@ -14781,7 +14764,6 @@ function rwe(e, t, r, n, o, i, s, l, u) { m++; }, "_loop"); m < d.length; - ) g(); if (p !== d.length - 1) { @@ -15748,7 +15730,6 @@ var hB = R((Wmt, mB) => { for ( var r = e || "", n = t || "div", o = {}, i = 0, s, l, u; i < r.length; - ) ((pB.lastIndex = i), (u = pB.exec(r)), @@ -15799,7 +15780,6 @@ var bB = R((N3) => { for ( var t = [], r = String(e || Pp), n = r.indexOf(M3), o = 0, i = !1, s; !i; - ) (n === -1 && ((n = r.length), (i = !0)), (s = r.slice(o, n).trim()), @@ -16294,7 +16274,6 @@ hexadecimal", m--, p++; ++m < p; - ) if ((_ === WB && (y = f[v] || 1), (_ = e.charCodeAt(m)), _ === GB)) { if ( @@ -16326,7 +16305,6 @@ hexadecimal", V = _1[D], se--; ++se < p && ((O = e.charCodeAt(se)), !!V(O)); - ) ((C += Oc(O)), D === Ic && REe.call(zB, C) && ((E = C), (Q = zB[C]))); ((S = e.charCodeAt(se) === PEe), @@ -17782,7 +17760,6 @@ var m$ = R((_ht, p$) => { for ( i = n[o], i = typeof i == "string" ? [i] : i, s = i.length, l = -1; ++l < s; - ) r[i[l]] = r[o]; } @@ -24041,7 +24018,6 @@ var NW = R((dCt, MW) => { for ( var r = e.length, n = "", o = 0, i = 0, s = t, l = OW; t > -1 && t < r; - ) { var u = IW(e[t + 1], 4), c = IW(e[t + 2], 0), @@ -35219,7 +35195,6 @@ var W6 = R((V6, Fre) => { for ( var n = String(r), o = n.length, i = -1, s, l = "", u = n.charCodeAt(0); ++i < o; - ) { if (((s = n.charCodeAt(i)), s == 0)) { l += "\uFFFD"; @@ -71648,7 +71623,6 @@ function An(e, t) { s = 0, l; s < o; - ) ((l = n[s]), t ? (i[s] = t(l, s)) : (i[s] = l), (s += 1)); return ((i.length = o), i); @@ -74091,7 +74065,6 @@ function zBe() { $ = 0, D = !1; A < q; - ) { switch (((U = G[G.length - 1]), U.tag)) { case "JS": @@ -77069,7 +77042,6 @@ function On(e, t) { s = 0, l; s < o; - ) ((l = n[s]), t ? (i[s] = t(l, s)) : (i[s] = l), (s += 1)); return ((i.length = o), i); @@ -83614,7 +83586,6 @@ function zce(e, t, r = !0) { t === void 0 ? n >= (r ? Math.max(e.childNodes.length - 1, 0) : 0) : n <= e.childNodes.length; - ) { if (t && n === e.childNodes.length) throw new Error("The given offset is out of bounds."); diff --git a/docs/sb-manager/runtime.js b/docs/sb-manager/runtime.js index a3e276f..c8ff5c2 100644 --- a/docs/sb-manager/runtime.js +++ b/docs/sb-manager/runtime.js @@ -695,7 +695,6 @@ var su = we((_A, iu) => { for ( var o = e.length, i = "", r = 0, n = 0, l = t, u = ru; t > -1 && t < o; - ) { var c = nu(e[t + 1], 4), d = nu(e[t + 2], 0), diff --git a/docs/vite-inject-mocker-entry.js b/docs/vite-inject-mocker-entry.js index 476414d..6eb6ac5 100644 --- a/docs/vite-inject-mocker-entry.js +++ b/docs/vite-inject-mocker-entry.js @@ -861,7 +861,6 @@ function ze() { J = 0, S = !1; p < L; - ) { switch ((($ = E[E.length - 1]), $.tag)) { case "JS": diff --git a/lib/cache.ts b/lib/cache.ts index 3727639..1e7e714 100644 --- a/lib/cache.ts +++ b/lib/cache.ts @@ -206,7 +206,10 @@ export function getCacheStats(): CacheStats { tagCacheSize: tagCache.size, authorCacheSize: authorCache.size, totalCacheSize: - blogPostCache.size + blogListCache.size + tagCache.size + authorCache.size, + blogPostCache.size + + blogListCache.size + + tagCache.size + + authorCache.size, maxCacheSize: MAX_CACHE_SIZE, cacheTTL: CACHE_TTL, }; diff --git a/lib/content.ts b/lib/content.ts index 44b8ed4..1780bcf 100644 --- a/lib/content.ts +++ b/lib/content.ts @@ -1,11 +1,8 @@ import fs from "fs"; import path from "path"; import matter from "gray-matter"; -import { - validateBlogPost, - sanitizeBlogPost, - type BlogPostFrontmatter, -} from "./validation"; +import { validateBlogPost, sanitizeBlogPost } from "./validation"; +import type { BlogPostFrontmatter } from "./validation"; /** * Content processing utilities for blog posts diff --git a/lib/types.ts b/lib/types.ts index b85479a..37b0611 100644 --- a/lib/types.ts +++ b/lib/types.ts @@ -3,15 +3,9 @@ */ // Re-export types from other modules for convenience -export type { - BlogPost, - BlogStats, -} from "./content"; +export type { BlogPost, BlogStats } from "./content"; -export type { - BlogPostFrontmatter, - ValidationResult, -} from "./validation"; +export type { BlogPostFrontmatter, ValidationResult } from "./validation"; export type { Heading, @@ -21,9 +15,7 @@ export type { ProcessedFrontmatter, } from "./mdx"; -export type { - CacheStats, -} from "./cache"; +export type { CacheStats } from "./cache"; // Additional shared types export interface ComponentProps { diff --git a/stories/Button.visual.stories.js b/stories/Button.visual.stories.js index 4860075..c64b5c8 100644 --- a/stories/Button.visual.stories.js +++ b/stories/Button.visual.stories.js @@ -1,4 +1,4 @@ -import Button from "../app/components/Button.js"; +import Button from "../app/components/Button"; import { within, userEvent } from "@storybook/test"; export default { diff --git a/stories/Footer.responsive.stories.js b/stories/Footer.responsive.stories.js index 3f8d936..0c1817f 100644 --- a/stories/Footer.responsive.stories.js +++ b/stories/Footer.responsive.stories.js @@ -1,4 +1,4 @@ -import Footer from "../app/components/Footer.js"; +import Footer from "../app/components/Footer"; import { within, userEvent } from "@storybook/test"; export default { diff --git a/stories/Header.responsive.stories.js b/stories/Header.responsive.stories.js index 4c958a8..e1ff4c2 100644 --- a/stories/Header.responsive.stories.js +++ b/stories/Header.responsive.stories.js @@ -1,4 +1,4 @@ -import Header from "../app/components/Header.js"; +import Header from "../app/components/Header"; export default { title: "Components/Header/Responsive", diff --git a/tests/integration/layout.integration.test.jsx b/tests/integration/layout.integration.test.jsx index 58864b2..aec49d8 100644 --- a/tests/integration/layout.integration.test.jsx +++ b/tests/integration/layout.integration.test.jsx @@ -14,7 +14,7 @@ describe("Layout Integration", () => {
-
, + ); // Check that CommunityRule branding appears in both header and footer @@ -30,31 +30,33 @@ describe("Layout Integration", () => {
-
, + ); // Header navigation items expect( screen.getAllByRole("menuitem", { name: "Navigate to Use cases page" }) - .length, + .length ).toBeGreaterThan(0); expect( - screen.getAllByRole("menuitem", { name: "Navigate to Learn page" }) - .length, + screen.getAllByRole("menuitem", { name: "Navigate to Learn page" }).length ).toBeGreaterThan(0); expect( - screen.getAllByRole("menuitem", { name: "Navigate to About page" }) - .length, + screen.getAllByRole("menuitem", { name: "Navigate to About page" }).length ).toBeGreaterThan(0); // Footer navigation items (should be present in footer as well) - const useCasesLinks = screen.getAllByRole("link", { name: "Use cases" }); - const learnLinks = screen.getAllByRole("link", { name: "Learn" }); - const aboutLinks = screen.getAllByRole("link", { name: "About" }); + // Footer has navigation links that match header + const footerUseCasesLinks = screen.getAllByRole("link", { + name: "Use cases", + }); + const footerLearnLinks = screen.getAllByRole("link", { name: "Learn" }); + const footerAboutLinks = screen.getAllByRole("link", { name: "About" }); - expect(useCasesLinks.length).toBeGreaterThan(0); - expect(learnLinks.length).toBeGreaterThan(0); - expect(aboutLinks.length).toBeGreaterThan(0); + // Check that footer has these links (they may be in header too, so getAllByRole will find both) + expect(footerUseCasesLinks.length).toBeGreaterThan(0); + expect(footerLearnLinks.length).toBeGreaterThan(0); + expect(footerAboutLinks.length).toBeGreaterThan(0); }); test("header navigation is interactive", async () => { @@ -94,23 +96,23 @@ describe("Layout Integration", () => { // Contact information expect(screen.getByText("medlab@colorado.edu")).toBeInTheDocument(); expect( - screen.getByRole("link", { name: "medlab@colorado.edu" }), + screen.getByRole("link", { name: "medlab@colorado.edu" }) ).toHaveAttribute("href", "mailto:medlab@colorado.edu"); // Social media links expect( - screen.getByRole("link", { name: "Follow us on Bluesky" }), + screen.getByRole("link", { name: "Follow us on Bluesky" }) ).toBeInTheDocument(); expect( - screen.getByRole("link", { name: "Follow us on GitLab" }), + screen.getByRole("link", { name: "Follow us on GitLab" }) ).toBeInTheDocument(); // Legal links expect( - screen.getByRole("link", { name: "Privacy Policy" }), + screen.getByRole("link", { name: "Privacy Policy" }) ).toBeInTheDocument(); expect( - screen.getByRole("link", { name: "Terms of Service" }), + screen.getByRole("link", { name: "Terms of Service" }) ).toBeInTheDocument(); }); @@ -136,7 +138,7 @@ describe("Layout Integration", () => {
-
, + ); // Header should have banner role @@ -157,7 +159,7 @@ describe("Layout Integration", () => {
-
, + ); // Header should have responsive navigation elements @@ -174,7 +176,7 @@ describe("Layout Integration", () => {
-
, + ); // Get all interactive elements @@ -197,7 +199,7 @@ describe("Layout Integration", () => {
-
, + ); // Header provides main navigation @@ -217,7 +219,7 @@ describe("Layout Integration", () => {
-
, + ); // Main navigation in header @@ -230,13 +232,13 @@ describe("Layout Integration", () => { (link) => link.textContent?.includes("Use cases") || link.textContent?.includes("Learn") || - link.textContent?.includes("About"), + link.textContent?.includes("About") ); expect(navigationLinks.length).toBeGreaterThan(0); // Contact information in footer expect( - screen.getByRole("link", { name: "medlab@colorado.edu" }), + screen.getByRole("link", { name: "medlab@colorado.edu" }) ).toBeInTheDocument(); }); }); diff --git a/tests/unit/BlogPage.test.jsx b/tests/unit/BlogPage.test.jsx index 3742a4d..3f57d8a 100644 --- a/tests/unit/BlogPage.test.jsx +++ b/tests/unit/BlogPage.test.jsx @@ -111,9 +111,8 @@ describe("BlogPostPage", () => { vi.clearAllMocks(); // Mock the content functions - const { getBlogPostBySlug, getAllBlogPosts } = await import( - "../../lib/content" - ); + const { getBlogPostBySlug, getAllBlogPosts } = + await import("../../lib/content"); vi.mocked(getBlogPostBySlug).mockReturnValue(mockPost); vi.mocked(getAllBlogPosts).mockReturnValue([mockPost, ...mockRelatedPosts]); }); diff --git a/tests/unit/Footer.test.jsx b/tests/unit/Footer.test.jsx index fefe69b..8298f00 100644 --- a/tests/unit/Footer.test.jsx +++ b/tests/unit/Footer.test.jsx @@ -27,7 +27,7 @@ describe("Footer", () => { expect(schemaData.email).toBe("medlab@colorado.edu"); expect(schemaData.url).toBe("https://communityrule.com"); expect(schemaData.sameAs).toContain( - "https://bsky.app/profile/medlabboulder", + "https://bsky.app/profile/medlabboulder" ); expect(schemaData.sameAs).toContain("https://gitlab.com/medlabboulder"); }); @@ -36,7 +36,7 @@ describe("Footer", () => { render(