Skip to content

fix: resolve 5 cross-package bugs causing test failures#24

Open
stooit wants to merge 1 commit into
mainfrom
quantcode/e2e-tier3-2399-1780245261
Open

fix: resolve 5 cross-package bugs causing test failures#24
stooit wants to merge 1 commit into
mainfrom
quantcode/e2e-tier3-2399-1780245261

Conversation

@stooit
Copy link
Copy Markdown
Contributor

@stooit stooit commented May 31, 2026

Summary

Fixes all failing tests across the monorepo by resolving 5 cross-package bugs:

  • Renamed hook importapps/web/src/lib/api.ts imported useThrottle which was renamed to useDebounce in packages/utils. Fixed the import and re-export alias (useSearchDebounce).
  • Missing DOM environment — UI package tests need jsdom. Added [test] environment = "jsdom" to packages/ui/bunfig.toml.
  • Button accessibilityButton component now passes through aria-label prop for icon-only buttons.
  • Date format — Changed format from zero-padded dd/MM/yyyy to d/MM/yyyy (day without leading zero).
  • DataTable stale closure — Sort handler used a stale sortDirection value. Fixed with functional state update pattern.

Verification

All 13 tests pass (bun test). No source-file type errors (npx tsc --noEmit — only bun:test module errors in test files, which are expected without bun type declarations installed).

Assumptions

  • The bun:test type errors are pre-existing and not in scope (they only affect test files which we don't modify).
  • No test files were modified — only source/config files.

- Fix renamed hook import (useDebounce) in apps/web/src/lib/api.ts
- Add jsdom test environment config for UI package tests
- Pass aria-label prop through Button component for accessibility
- Use day-first format without leading zero in date formatter
- Fix stale closure in DataTable sort handler with functional state update
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