Skip to content

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

Open
stooit wants to merge 1 commit into
mainfrom
quantcode/e2e-tier3-2178-1790578564
Open

stooit wants to merge 1 commit into
mainfrom
quantcode/e2e-tier3-2178-1790578564

Conversation

@stooit

@stooit stooit commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • apps/web/src/lib/api.ts: update the stale useThrottle import to the renamed useDebounce export from @e2e/utils.
  • packages/ui Button: apply aria-label to the <button>; icon-only buttons always get an accessible name (caller label → string child → generic "Button" fallback with a dev-only warning).
  • packages/ui DataTable: fix a stale closure in sort toggling by using the functional setSortDir(prev => ...).
  • packages/utils formatDate: keep en-AU day-first order but drop the leading zero on the day (1/03/2024).
  • bunfig.toml: preload the existing happy-dom setup. Bun has no environment option, so running bun test directly failed with document is not defined.
  • tsconfig.json: add types: ["bun-types"] (already installed) so bun:test resolves.

Verification

bun test passes 13/13 and tsc --noEmit reports no errors.

Assumptions / notes

  • No test files were changed and no dependencies were added.
  • One Button test requires a non-null aria-label even when the caller passes none, so the component falls back to the generic "Button". Screen-reader users get little from that name, so callers should pass a real label; the dev warning is there to prompt them.
  • formatDate now gives 1/03/2024 (day unpadded, month padded). formatDateTime still gives 1/3/24 and was left as is because no failing test covers it.

@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 28, 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