You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(frontend/test): add missing escapeHtmlAttr to utils mocks (Build frontend CI red) #1115
frontend/src/plans.ts (11 call sites) and frontend/src/history.ts (6) use escapeHtmlAttr, but several test suites' jest.mock('../utils', () => ({ ... })) factories do not stub escapeHtmlAttr. When those tests render plans/history, the call throws:
TypeError: (0 , utils_1.escapeHtmlAttr) is not a function
This fails the "Build frontend" CI job (it runs the jest suites) on the base branch and on every frontend PR (e.g. visible on #1114, which only inherited it). plans.test.ts and the history-* suites are affected.
Fix
Add an escapeHtmlAttr stub to the jest.mock('../utils', …) factory in each affected suite, mirroring the real helper (escapes & < > " '). frontend/src/__tests__/history.test.ts already has a correct stub to copy.
Acceptance criteria
Every frontend jest suite that renders plans/history mocks escapeHtmlAttr.
jest frontend suites pass (the 2 pre-existing formatDate/getDateParts timezone failures are unrelated and out of scope).
Activity
fix(frontend/test): stub escapeHtmlAttr in utils mocks to unbreak Bui…
fix(frontend/test): add missing escapeHtmlAttr stub to utils mock (#1117