Skip to content

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

Open
stooit wants to merge 1 commit into
mainfrom
quantcode/job-e2e-tier3-2452-1780019622
Open

fix: resolve all cross-package test failures and type errors#19
stooit wants to merge 1 commit into
mainfrom
quantcode/job-e2e-tier3-2452-1780019622

Conversation

@stooit
Copy link
Copy Markdown
Contributor

@stooit stooit commented May 29, 2026

Summary

Fixes all failing tests and TypeScript errors in this multi-package monorepo. The bugs spanned multiple packages with cross-cutting dependencies.

Changes

  • packages/utils/src/index.ts — Added useSearchDebounce and useThrottle as re-exports of useDebounce hook (the hook was renamed but consumers still referenced old names)
  • packages/ui/src/components/Button/Button.tsx — Forward aria-label prop to the underlying <button> element for accessibility
  • packages/ui/src/components/DataTable/DataTable.tsx — Fix stale closure bug by using functional state update (setSortDirection(prev => ...))
  • packages/utils/src/format/date.ts — Fix date format to use day without leading zero (d/MM/yyyy → "1/03/2024")
  • bunfig.toml — Add preload for UI test setup to enable happy-dom environment when running tests from root
  • tsconfig.json — Add bun-types to compiler types for bun:test module resolution

Verification

  • bun test → 13 pass, 0 fail
  • npx tsc --noEmit → 0 errors

Assumptions

  • useSearchDebounce and useThrottle are aliases for the same underlying useDebounce hook
  • The date format should be d/MM/yyyy (single-digit day, zero-padded month, 4-digit year)
  • No test files were modified
  • No new dependencies were added

- Add useSearchDebounce and useThrottle exports from packages/utils
- Fix Button component to forward aria-label prop for accessibility
- Fix DataTable stale closure bug using functional state update
- Fix date formatting to use day without leading zero (d/MM/yyyy)
- Configure happy-dom test environment in root bunfig.toml
- Add bun-types to tsconfig for bun:test module resolution
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