Skip to content

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

Open
stooit wants to merge 1 commit into
mainfrom
quantcode/e2e-tier3-2418-1784996604
Open

fix: resolve cross-package test failures and type errors#88
stooit wants to merge 1 commit into
mainfrom
quantcode/e2e-tier3-2418-1784996604

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. After the fixes, bun run test reports 13 pass / 0 fail and tsc --noEmit exits 0.

Tests are run via the bun run test package script (which sets up the happy-dom preload); bare bun test skips that preload and produces spurious document is not defined errors.

Bugs fixed

File Fix
apps/web/src/lib/api.ts Hook was renamed in @e2e/utils; import/use useSearchDebounce instead of the removed useThrottle.
packages/ui/src/components/Button/Button.tsx Forward aria-label so icon-only buttons expose an accessible name (a11y test).
packages/ui/src/components/DataTable/DataTable.tsx Stale-closure sort bug — use the functional state updater so the sort direction toggles correctly on the controlled re-render test.
packages/utils/src/format/date.ts Wrong locale/format string caused day/month confusion; corrected so "day 1 is not confused with month 1".
tsconfig.json Added bun-types to compilerOptions.types so bun:test resolves in test files (config-only; bun-types already a devDependency).

Verification

  • bun run test → 13 pass, 0 fail
  • tsc --noEmit → exit 0, no errors

Constraints honoured

  • No test files modified.
  • No dependencies added (bun-types was already present).
  • Only source + tsconfig changes required by the tests.

- api.ts: import/use useSearchDebounce (renamed from useThrottle) from @e2e/utils
- Button: forward aria-label so icon-only buttons have an accessible name
- DataTable: use functional state updater to fix stale-closure sort direction bug
- date.ts: use correct locale/format so day 1 is not confused with month 1
- tsconfig: add bun-types to types so bun:test resolves in test files

All 13 tests pass; tsc --noEmit is clean. No test files or dependencies changed.
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