Skip to content

fix: repair failing tests and type errors across monorepo - #281

Open
stooit wants to merge 1 commit into
mainfrom
quantcode/e2e-tier3-933-1794316742
Open

stooit wants to merge 1 commit into
mainfrom
quantcode/e2e-tier3-933-1794316742

Conversation

@stooit

@stooit stooit commented Nov 10, 2026

Copy link
Copy Markdown
Contributor

Root bun test now passes 13/13 (it was 9 failing). tsc --noEmit is clean.

  • apps/web/src/lib/api.ts: it imported useThrottle, which had been renamed to useDebounce in packages/utils. It now imports useDebounce and still re-exports it as useSearchDebounce.
  • packages/ui Button: the component now passes aria-label through to the rendered button. If an icon-only button has no label, it falls back to string children, then to "Button" as a placeholder. Outside production it also logs a console.warn, which the test name and the component docstring both asked for.
  • packages/utils formatDate: builds the date as unpadded day, padded month, then year (e.g. 1/03/2024), which is what the test expects. This changes visible output for days 1–9, which used to render as 01/03/2024.
  • bunfig.toml: the root file used environment = "happy-dom", which isn't a valid Bun option, so no DOM was being set up. It now preloads packages/ui/test/setup.ts.
  • tsconfig.json: added bun-types to types so the bun:test imports type-check. bun-types was already a devDependency.

Assumptions

  • No test files were changed and no dependencies were added.
  • The DataTable stale-closure test passes once the DOM setup is fixed. handleSort is recreated on every render, so DataTable.tsx was left unchanged.
  • tsc isn't on PATH in this environment, so I ran the type check with bunx tsc --noEmit.
  • The "Button" fallback label exists only because the test requires some non-empty label. Callers should still pass a meaningful aria-label.

- utils rename: use useDebounce (formerly useThrottle) in apps/web api
- ui Button: render aria-label with icon-only fallback and dev warning
- utils formatDate: unpadded day, padded month (en-AU) e.g. 1/03/2024
- bunfig.toml: preload happy-dom setup (invalid 'environment' key removed)
- tsconfig: add bun-types for bun:test typings
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