Skip to content

fix: resolve cross-package test failures and type errors - #98

Open
stooit wants to merge 1 commit into
mainfrom
quantcode/e2e-tier3-2483-1785170928
Open

fix: resolve cross-package test failures and type errors#98
stooit wants to merge 1 commit into
mainfrom
quantcode/e2e-tier3-2483-1785170928

Conversation

@stooit

@stooit stooit commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes all failing tests and type errors across the monorepo. bun run test13 pass / 0 fail; bunx tsc --noEmitclean. No test files modified; no dependencies added.

Root causes & fixes

  • apps/web/src/lib/api.ts — the hook was renamed in packages/utils (useThrottleuseDebounce), but the consumer still imported the old name. Updated the import to the current useDebounce export.
  • packages/ui/.../Button/Button.tsx — icon-only buttons lacked an accessible name. Added the aria-label required for WCAG 4.1.2.
  • packages/ui/.../DataTable/DataTable.tsx — fixed a stale-closure bug surfaced by the controlled re-render test.
  • packages/utils/src/format/date.ts — date formatting produced US month-first / 2-digit-year output. Now uses en-AU via Intl.DateTimeFormat.formatToParts to emit day-first 1/03/2024 (unpadded day, zero-padded month, 4-digit year). en-AU ICU widens a numeric day to 2-digit when paired with a 2-digit month, so formatToParts keeps the day unpadded as the test requires.
  • tsconfig.json — added bun-types to the types array (Bun globals; does not loosen strictness).

Verification

  • bun run test: 13 passing across 5 files
  • bunx tsc --noEmit: exit 0

Notes / assumptions

  • The useThrottleuseDebounce rename in packages/utils was treated as intentional; the stale consumer was reconciled rather than reverting the rename.

- api.ts: import current useDebounce export (was stale useThrottle name)
- Button: add aria-label for icon-only buttons (WCAG 4.1.2)
- DataTable: fix stale closure in controlled re-render
- date.ts: en-AU day-first formatting via formatToParts (1/03/2024, keeps 4-digit year)
- tsconfig: add bun-types to types array
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