Skip to content

fix: resolve cross-package test failures in monorepo#52

Open
stooit wants to merge 1 commit into
mainfrom
quantcode/e2e-tier3-2439-1781973697
Open

fix: resolve cross-package test failures in monorepo#52
stooit wants to merge 1 commit into
mainfrom
quantcode/e2e-tier3-2439-1781973697

Conversation

@stooit

@stooit stooit commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes all 5 failing tests and the related type error across the monorepo. After these changes bun run test reports 13 pass / 0 fail and npx tsc --noEmit has no new errors (only pre-existing bun:test resolution noise in untouched test files remains).

Bugs fixed

  1. Renamed hook (cross-package)apps/web/src/lib/api.ts imported useThrottle from @e2e/utils, which no longer exists. Updated to import the actual export useDebounce and re-export it under the consumer-facing name useSearchDebounce that the test expects.
  2. Button accessibility — icon-only Button now forwards aria-label to the underlying <button> so it has an accessible name, and emits a console.warn when an icon-only button is rendered without one.
  3. Date formattingpackages/utils/src/format/date.ts produced a locale-dependent string. Now builds a deterministic DD/MM/YYYY value so the day is not confused with the month.

Verification

  • bun run test → 13 pass / 0 fail
  • npx tsc --noEmit → no new errors (pre-existing bun:test test-file errors are unchanged and out of scope)
  • The pre-existing DataTable stale-closure test still passes — unaffected by these changes.

Assumptions / scope

  • Followed constraints: no test files modified, no dependencies added, fixed only what the tests require.
  • The canonical exported hook name was fixed as useSearchDebounce per the test; api.ts was reconciled to that.

🤖 Generated autonomously

- api.ts: import renamed useDebounce hook and re-export as useSearchDebounce
- Button: forward aria-label for icon-only buttons and warn when missing
- date.ts: produce deterministic DD/MM/YYYY format (locale-independent)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant