fix: resolve cross-package test failures and type error#48
Open
stooit wants to merge 1 commit into
Open
Conversation
- api.ts: import renamed hook useDebounce (was useThrottle) from @e2e/utils - Button: forward aria-label so icon-only buttons have an accessible name - DataTable: fix stale-closure bug caught by controlled re-render test - date.ts: use en-AU locale ordering (day-first) instead of US field order - tsconfig: add bun-types so bun:test test files type-check cleanly
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes all failing tests and the type error in the monorepo.
bun run test→ 13 pass / 0 fail;npx tsc --noEmit→ clean. The bugs spanned all three packages.Changes
apps/web/src/lib/api.ts—useThrottlewas renamed touseDebounceinpackages/utils, but the app still imported the old name (TS2305). Updated the import and theas useSearchDebouncere-export. Fixes theapi moduleimport + export tests.packages/ui/src/components/Button/Button.tsx— Icon-only buttons had no accessible name; the component now forwardsaria-label. Fixes the twoButtona11y tests.packages/ui/src/components/DataTable/DataTable.tsx— Fixed a stale-closure bug surfaced by the controlled re-render test.packages/utils/src/format/date.ts—formatDateused explicit US-style field order producingMM/DD/YYYY(01/03/2024); now relies on theen-AUlocale for day-first ordering with a 4-digit year. Fixes theformatDatetest.tsconfig.json— Addedbun-types(already innode_modules) sobun:testimports type-check cleanly. No test files modified.Verification
bun run test→ 13 pass, 0 failnpx tsc --noEmit→ cleanConstraints honoured
bun-typesalready present). Only required source files changed.