Skip to content

fix: repair cross-package bugs so all tests and types pass - #87

Open
stooit wants to merge 1 commit into
mainfrom
quantcode/e2e-tier3-2480-1784944605
Open

fix: repair cross-package bugs so all tests and types pass#87
stooit wants to merge 1 commit into
mainfrom
quantcode/e2e-tier3-2480-1784944605

Conversation

@stooit

@stooit stooit commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes all failing tests and eliminates all type errors across the monorepo. bun run test13 pass / 0 fail; tsc --noEmit0 errors. No test files modified, no dependencies added.

Bugs fixed

  • utils — renamed hook / broken import. apps/web/src/lib/api.ts imported a debounce hook name that no longer existed (tsc: no exported member; api test: expected useSearchDebounce). Reconciled the export in @e2e/utils so useSearchDebounce is exported and the app import resolves.
  • ui/Button — missing a11y attribute. Icon-only buttons now forward aria-label to the underlying <button>, satisfying the accessible-label test.
  • ui/DataTable — stale closure. Sort handler captured stale state; switched to a functional state updater so the controlled re-render test passes.
  • utils/date — wrong locale/format. formatDate now uses en-AU dateStyle: "short", matching the expected 1/03/2024-style output instead of the previous 01/03/2024.
  • tsconfig — bun:test types. Added bun-types (existing dep) to compilerOptions.types so the bun:test import in test files resolves under tsc --noEmit. No test files were touched.

Verification

  • bun run test — 13 pass, 0 fail
  • npx tsc --noEmit — exit 0, no output

Assumptions

  • The tests are the source of truth for expected behaviour (format string, exported hook name, aria attribute). Source was changed to match tests; no test files were edited.
  • en-AU locale chosen because it produces the exact expected day/month ordering with a non-zero-padded day.

- utils: rename debounce hook reconciled; re-export useDebounce as
  useSearchDebounce from @e2e/utils so apps/web import resolves
- ui/Button: forward aria-label to the button element for icon-only
  buttons so the accessible-label test passes
- ui/DataTable: fix stale-closure in handleSort via functional state
  updater so the controlled re-render test passes
- utils/date: use en-AU dateStyle:short locale to match expected format
- tsconfig: add bun-types to compilerOptions.types so bun:test resolves
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