Skip to content

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

Open
stooit wants to merge 1 commit into
mainfrom
quantcode/e2e-tier3-2428-1783873505
Open

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

Conversation

@stooit

@stooit stooit commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes all failing tests and type errors across the monorepo (packages/ui, packages/utils, apps/web). All 13 tests pass under bun run test and npx tsc --noEmit is clean. No test files modified; no dependencies added.

Fixes

  • utils / date (packages/utils/src/format/date.ts): formatDate now emits a day-first, non-zero-padded date (1/03/2024 rather than 01/03/2024) using Intl.DateTimeFormat.formatToParts, keeping day-before-month order locale-robustly.
  • utils → web (apps/web/src/lib/api.ts): the hook was renamed in packages/utils; the consumer imported the stale useThrottle. Aligned the import/usage to the current useDebounce export (TS2305 resolved).
  • ui / Button (packages/ui/src/components/Button/Button.tsx): aria-label is now forwarded to the rendered element, with a sensible "icon button" default when iconOnly is set and none is supplied.
  • ui / DataTable (packages/ui/src/components/DataTable/DataTable.tsx): fixed a stale-closure bug caught by the controlled re-render test by using a functional setState updater.
  • tsconfig (tsconfig.json): added bun-types so the bun:test globs typecheck cleanly; no test file contents touched.

Verification

  • bun run test → 13 pass / 0 fail
  • npx tsc --noEmit → clean

Assumptions

  • The renamed hook's intended replacement is useDebounce (the current export in packages/utils); the consumer was aligned to source rather than reverting the rename.
  • The date format target is D/MM/YYYY day-first per the test's expected 1/03/2024.

- utils/date: emit day-first non-zero-padded date via Intl formatToParts
- utils→web: align api.ts import to renamed useDebounce hook (was useThrottle)
- ui/Button: forward aria-label and default to 'icon button' for icon-only
- ui/DataTable: fix stale closure via functional setState updater
- tsconfig: add bun-types so test globs typecheck 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