Skip to content

fix: resolve all failing tests across monorepo packages#17

Open
stooit wants to merge 1 commit into
mainfrom
quantcode/job-e2e-tier3-4884-1779902117
Open

fix: resolve all failing tests across monorepo packages#17
stooit wants to merge 1 commit into
mainfrom
quantcode/job-e2e-tier3-4884-1779902117

Conversation

@stooit
Copy link
Copy Markdown
Contributor

@stooit stooit commented May 27, 2026

Summary

  • Renamed hook export: Added useSearchDebounce export alias in packages/utils (the hook was renamed to useDebounce but consumers still referenced the old name)
  • Fixed stale import: Updated apps/web/src/lib/api.ts to import useSearchDebounce instead of the non-existent useThrottle
  • Button accessibility: Fixed the Button component to pass through aria-label prop for icon-only buttons
  • DataTable stale closure: Fixed sort handler to use functional state update (prev => ...) instead of capturing stale closure value
  • Date formatting: Changed date format from dd/MM/yyyy to d/MM/yyyy to avoid zero-padding the day
  • Test environment: Configured happy-dom preload in root bunfig.toml so DOM-dependent UI tests run correctly from workspace root

Verification

All 13 tests pass across 5 test files. TypeScript compilation is clean (only bun:test module declaration warnings in test files, which are expected).

Assumptions

  • The bun:test TypeScript errors are expected and do not affect runtime — bun resolves these internally
  • The date format change to non-padded day (d/MM/yyyy) matches the test expectation of output starting with "1" for March 1st
  • The happy-dom preload at root level is the correct approach for bun workspace test runs

- Add useSearchDebounce export alias in packages/utils (renamed hook)
- Update apps/web/src/lib/api.ts to use useSearchDebounce instead of useThrottle
- Fix Button component to pass through aria-label prop for accessibility
- Fix DataTable stale closure bug using functional state update in sort handler
- Fix date formatter to use non-padded day format (d/MM/yyyy)
- Configure happy-dom preload in root bunfig.toml for DOM test environment
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