Skip to content

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

Open
stooit wants to merge 1 commit into
mainfrom
quantcode/job-e2e-tier3-2222-1779437701
Open

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

Conversation

@stooit
Copy link
Copy Markdown
Contributor

@stooit stooit commented May 22, 2026

Summary

  • Renamed hook export: Added useSearchDebounce as a named re-export from @e2e/utils (the hook was renamed from useThrottle/useDebounce but consumers still imported the old name)
  • Fixed stale import: Updated apps/web/src/lib/api.ts to import useSearchDebounce instead of the non-existent useThrottle
  • Accessibility fix: Ensured the Button component passes through aria-label for icon-only buttons
  • Stale closure fix: Changed DataTable sort handler to use functional state update, preventing stale closure on re-renders
  • Date format fix: Corrected formatDate to output day without leading zero (Australian locale: d/MM/yyyy)
  • DOM test environment: Added happy-dom preload to packages/ui/bunfig.toml so UI component tests have access to document
  • Type declarations: Added bun-types to tsconfig.json so bun:test module resolves without type errors

Verification

All 13 tests pass (bun run test) and tsc --noEmit exits clean.

Assumptions

  • The test expectation for useSearchDebounce is the canonical name; the source was behind
  • Australian date locale (d/MM/yyyy) is the intended format based on test expectations
  • bun-types was already installed in node_modules — no new dependency added

- Export useSearchDebounce alias from @e2e/utils (renamed hook)
- Fix import in apps/web/src/lib/api.ts to use useSearchDebounce
- Add aria-label prop passthrough in Button component for accessibility
- Fix stale closure in DataTable sort handler using functional state update
- Fix date format to use day without leading zero (Australian locale)
- Add happy-dom preload to packages/ui/bunfig.toml for DOM test env
- Add bun-types to tsconfig.json compilerOptions for bun:test declarations
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