Skip to content

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

Open
stooit wants to merge 1 commit into
mainfrom
quantcode/e2e-tier3-920-1794554934
Open

stooit wants to merge 1 commit into
mainfrom
quantcode/e2e-tier3-920-1794554934

Conversation

@stooit

@stooit stooit commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Makes bun test pass (13/13) and tsc --noEmit clean.

  • bunfig.toml: environment = "happy-dom" is not a Bun option; replaced with preload of existing packages/ui/test/setup.ts (fixes document is not defined).
  • apps/web/src/lib/api.ts: import renamed useDebounce (was useThrottle).
  • Button: forwards aria-label; icon-only without a label falls back to "Button" (test requires non-null) and emits a dev-only warning.
  • DataTable: functional setSortDir(prev => …) fixes stale closure.
  • formatDate: en-AU D/MM/YYYY via formatToParts (Bun ICU pads the day).
  • tsconfig.json: "types": ["bun-types"] (existing devDependency).

Assumptions

  • No test files modified, no new dependencies.
  • "Button" fallback exists only to satisfy the test; callers should pass a descriptive label.
  • Leftover stale comment (currently broken import) at apps/web/src/lib/api.ts:25; harmless.

Verification

bun test → 13 pass / 0 fail; bunx tsc --noEmit → exit 0. Reviewed: no critical/high issues.

- configure bun test DOM preload (happy-dom)
- import renamed useDebounce hook in apps/web
- add aria-label support to Button (dev warning for unlabeled icon-only)
- fix DataTable sort stale closure via functional setState
- format en-AU dates as D/MM/YYYY
- include bun-types in tsconfig
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