Skip to content

fix: repair cross-package test failures and type errors - #183

Open
stooit wants to merge 1 commit into
mainfrom
quantcode/e2e-tier3-2254-1790094132
Open

stooit wants to merge 1 commit into
mainfrom
quantcode/e2e-tier3-2254-1790094132

Conversation

@stooit

@stooit stooit commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes all failing tests and type errors in the monorepo. bun run test → 13 pass / 0 fail; bunx tsc --noEmit → 0 errors. No test files modified, no dependencies added.

Fixes by area

Package File Fix
apps/web src/lib/api.ts Hook was renamed in packages/utils (useThrottle → useDebounce). Import the current name and re-export it as useSearchDebounce (the app-level alias the test asserts on). Resolves the TS2305 type error and both api module tests.
packages/ui components/Button/Button.tsx aria-label was not forwarded to the rendered <button>. Now passed through, with an iconOnly fallback label + dev-only console.warn when none is supplied (WCAG 4.1.2). Fixes both accessibility tests.
packages/utils format/date.ts formatDate returned 01/03/2024; test requires day-first with no leading zero on the day. Uses formatToParts and strips the day's leading zero → 1/03/2024.
root tsconfig.json Registered the already-installed bun-types devDependency via compilerOptions.types so bun:test resolves — clears 4 pre-existing TS2307 errors to reach the required zero-error state.

Assumptions

  • useSearchDebounce is intended as the app-level export name; packages/utils legitimately exports useDebounce and was left unchanged.
  • The bun:test TS2307 errors were pre-existing (confirmed against baseline). Fixing them was in-scope given the "eliminate all type errors" goal, and uses only a devDependency already in package.json — no new deps.
  • The DataTable stale-closure test passes with the configured happy-dom preload; no change was required there.

Verification

  • bun run test → 13 pass, 0 fail (17 assertions, 5 files)
  • bunx tsc --noEmit → 0 errors

- api: import current useDebounce hook (renamed from useThrottle) and
  re-export as useSearchDebounce in apps/web
- ui: pass aria-label through Button and add iconOnly fallback label
  with dev warning (WCAG 4.1.2)
- utils: fix formatDate to day-first with no leading zero on the day
- tsconfig: register bun-types so bun:test resolves (removes 4 TS2307)
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