Skip to content

fix: resolve all failing tests and type errors across monorepo#6

Open
stooit wants to merge 1 commit into
mainfrom
quantcode/job-e2e-tier3-2369-1779437077
Open

fix: resolve all failing tests and type errors across monorepo#6
stooit wants to merge 1 commit into
mainfrom
quantcode/job-e2e-tier3-2369-1779437077

Conversation

@stooit
Copy link
Copy Markdown
Contributor

@stooit stooit commented May 22, 2026

Summary

  • Re-exported renamed hook: useDebounce in packages/utils is now also exported as useSearchDebounce and useThrottle to fix broken imports in apps/web
  • Fixed Button accessibility: Passes aria-label prop through to the rendered element, satisfying the icon-only button accessibility test
  • Fixed DataTable stale closure: Sort handler now uses functional state update (prev => ...) to avoid capturing stale sort direction
  • Fixed date formatting: Changed format from dd/MM/yyyy to d/MM/yyyy to produce non-zero-padded day output (e.g., "1/03/2024")
  • Fixed test DOM environment: Configured bunfig.toml to preload happy-dom/global so @testing-library/react has access to document
  • Fixed TypeScript errors: Added bun-types to tsconfig types array for bun:test module resolution

Verification

All 13 tests pass across 5 files. Zero TypeScript errors from tsc --noEmit.

Assumptions

  • The bun:test type errors needed fixing (added already-installed bun-types to tsconfig)
  • useSearchDebounce and useThrottle are aliases for the existing useDebounce hook
  • The date format test expects Australian locale day-first format without zero padding

- Re-export useDebounce as useSearchDebounce and useThrottle in packages/utils
- 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 formatting to use non-zero-padded day format (d/MM/yyyy)
- Configure bunfig.toml to use happy-dom preload for DOM test environment
- 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