Skip to content

fix: resolve failing tests and type errors across monorepo - #189

Open
stooit wants to merge 1 commit into
mainfrom
quantcode/e2e-tier3-2175-1790525910
Open

stooit wants to merge 1 commit into
mainfrom
quantcode/e2e-tier3-2175-1790525910

Conversation

@stooit

@stooit stooit commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

Summary

bun test && tsc --noEmit now passes from the root: 13 tests pass, 0 fail, and tsc reports no errors. No test files were modified and no dependencies were added.

  • apps/web: useThrottle was renamed to useDebounce in @e2e/utils. api.ts now imports the new name and still exports it as useSearchDebounce.
  • packages/utils: formatDate now prints the day without a leading zero (1/03/2024) while keeping en-AU day-first order and a 4-digit year.
  • packages/ui Button: aria-label is now put on the <button>. Before, it was read from props and never used. Icon-only buttons with no label fall back to string children, then to "Button", and log a warning outside production.
  • packages/ui DataTable: the sort toggle now uses a functional state update (prev => ...).
  • Test infra: the root bunfig.toml now preloads the happy-dom registrator that was already there. The old environment = "happy-dom" key does nothing in Bun, so the UI tests had no DOM. tsconfig.json now includes bun-types so bun:test resolves.

Assumptions / known compromises

  • Button fallback label: the test needs a non-null aria-label even when none is passed. The generic "Button" fallback meets the test, but it gives screen reader users no useful name. The warning is there so developers add real labels.
  • Date format: the output is D/MM/YYYY (day not padded, month padded). The test forces this, but it's not a common Australian format. formatDateTime still uses dateStyle: "short", so the two functions now print dates differently.
  • DataTable: review found no failing test for this; the component's suite passes without the change. It's kept because the task named a stale-closure bug and a functional update is the safe pattern. It doesn't change behaviour.

@stooit stooit changed the title fix: resolve failing tests and type errors across ui, utils, and web packages fix: resolve failing tests and type errors across monorepo Sep 27, 2026
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