Skip to content

fix: resolve all failing tests across monorepo packages#4

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

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

Conversation

@stooit
Copy link
Copy Markdown
Contributor

@stooit stooit commented May 22, 2026

Summary

  • Fixed missing useSearchDebounce export: The useDebounce hook in packages/utils was being imported as useThrottle in apps/web. Updated the import and re-export alias to useSearchDebounce as expected by tests.
  • Fixed DOM environment for UI tests: Added happy-dom test environment configuration in bunfig.toml for packages/ui component tests.
  • Fixed Button accessibility: Ensured the Button component passes through aria-label prop for icon-only buttons.
  • Fixed DataTable stale closure: Used functional state update (prev => ...) in the sort direction handler to avoid stale closure bug.
  • Fixed date formatting: Changed format string to use non-zero-padded day (d/MM/yyyy) matching test expectations.

Verification

All 13 tests pass (bun test), and npx tsc --noEmit shows no source code type errors (only expected bun:test module resolution in test files).

Assumptions

  • The bun:test module resolution errors in test files are acceptable since they are inherent to bun's test runner and test files cannot be modified.
  • happy-dom was already available in node_modules (no new dependencies added).

- Fix useSearchDebounce export by re-exporting useDebounce with correct alias in apps/web
- Add happy-dom test environment config for UI component tests
- Pass aria-label prop through Button component for accessibility
- Fix stale closure in DataTable sort handler using functional state update
- Fix date formatting to use non-zero-padded day (d/MM/yyyy)
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