Skip to content

fix: resolve cross-package test failures and type error#48

Open
stooit wants to merge 1 commit into
mainfrom
quantcode/e2e-tier3-2359-1781752304
Open

fix: resolve cross-package test failures and type error#48
stooit wants to merge 1 commit into
mainfrom
quantcode/e2e-tier3-2359-1781752304

Conversation

@stooit

@stooit stooit commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes all failing tests and the type error in the monorepo. bun run test → 13 pass / 0 fail; npx tsc --noEmit → clean. The bugs spanned all three packages.

Changes

  • apps/web/src/lib/api.tsuseThrottle was renamed to useDebounce in packages/utils, but the app still imported the old name (TS2305). Updated the import and the as useSearchDebounce re-export. Fixes the api module import + export tests.
  • packages/ui/src/components/Button/Button.tsx — Icon-only buttons had no accessible name; the component now forwards aria-label. Fixes the two Button a11y tests.
  • packages/ui/src/components/DataTable/DataTable.tsx — Fixed a stale-closure bug surfaced by the controlled re-render test.
  • packages/utils/src/format/date.tsformatDate used explicit US-style field order producing MM/DD/YYYY (01/03/2024); now relies on the en-AU locale for day-first ordering with a 4-digit year. Fixes the formatDate test.
  • tsconfig.json — Added bun-types (already in node_modules) so bun:test imports type-check cleanly. No test files modified.

Verification

  • bun run test13 pass, 0 fail
  • npx tsc --noEmitclean

Constraints honoured

  • No test files modified. No new dependencies (bun-types already present). Only required source files changed.

- api.ts: import renamed hook useDebounce (was useThrottle) from @e2e/utils
- Button: forward aria-label so icon-only buttons have an accessible name
- DataTable: fix stale-closure bug caught by controlled re-render test
- date.ts: use en-AU locale ordering (day-first) instead of US field order
- tsconfig: add bun-types so bun:test test files type-check cleanly
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