Skip to content

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

Open
stooit wants to merge 1 commit into
mainfrom
quantcode/e2e-tier3-2171-1790571044
Open

stooit wants to merge 1 commit into
mainfrom
quantcode/e2e-tier3-2171-1790571044

Conversation

@stooit

@stooit stooit commented Sep 28, 2026

Copy link
Copy Markdown
Contributor

Summary

Makes bun test && tsc --noEmit green (13 pass / 0 fail, tsc clean). No test files modified, no dependencies added.

  • bunfig.toml: environment = "happy-dom" isn't a valid Bun key; replaced with preload of the existing packages/ui/test/setup.ts (happy-dom GlobalRegistrator).
  • tsconfig.json: added types: ["bun-types"] (already installed) to resolve bun:test.
  • apps/web/src/lib/api.ts: useThrottle → useDebounce (renamed export); public useSearchDebounce alias preserved.
  • packages/utils/src/format/date.ts: en-AU D/MM/YYYY via formatToParts with unpadded day (ICU en-AU pads day, so day: numeric alone isn't enough).
  • Button.tsx: icon-only buttons get aria-label (explicit → string children → "Button" fallback + dev warning).
  • DataTable.tsx: sort key/dir merged into single state updated functionally, fixing the stale closure.

Assumptions / follow-ups

  • The generic "Button" fallback label satisfies the test but isn't descriptive; call sites should pass explicit aria-label.
  • The root test script's --preload is now redundant with bunfig (harmless).

- register happy-dom via bunfig preload; add bun-types to tsconfig
- update renamed useThrottle import to useDebounce in apps/web
- format dates as en-AU D/MM/YYYY
- apply aria-label to icon-only Button (WCAG 4.1.2)
- use atomic sort state to remove DataTable stale closure
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