Skip to content

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

Open
stooit wants to merge 1 commit into
mainfrom
quantcode/e2e-tier3-2307-1794067855
Open

stooit wants to merge 1 commit into
mainfrom
quantcode/e2e-tier3-2307-1794067855

Conversation

@stooit

@stooit stooit commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

Makes bun test && tsc --noEmit pass from the repo root (13/13 tests, 0 type errors).

  • apps/web/src/lib/api.ts: useThrottle was renamed to useDebounce in @e2e/utils, so the import now uses the new name. It is still exported as useSearchDebounce.
  • packages/ui Button: aria-label is now applied to the button. Icon-only buttons with no label fall back to "Button" and log a warning outside production.
  • packages/ui DataTable: the sort toggle now uses a functional state updater, which fixes the stale closure.
  • packages/utils formatDate: en-AU output now has an unpadded day, e.g. 1/03/2024.
  • bunfig.toml: preloads packages/ui/test/setup.ts (happy-dom), so a plain bun test has a DOM.
  • tsconfig.json: adds "types": ["bun-types"], which was already installed.

Assumptions

  • The Button test requires a non-null aria-label even when none is passed. A generic fallback was chosen over an empty string so the button still has an accessible name.
  • en-AU ICU zero-pads the day, so the day is converted to a number by hand. The / separator is hard-coded.
  • The DataTable functional updater is the correct fix, although the existing test also passes without it.
  • No test files were changed and no dependencies were added.

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