fix: resolve 4 cross-package test failures in monorepo#55
Open
stooit wants to merge 1 commit into
Open
Conversation
- api.ts: reconcile renamed hook useThrottle -> useDebounce across the @e2e/utils boundary, keeping the public useSearchDebounce alias - date.ts: use Intl dateStyle:"short" so en-AU formats day-first (1/03/2024) - Button.tsx: forward aria-label to the element and provide an accessible name fallback for icon-only buttons (WCAG 4.1.2) - DataTable.tsx: fix stale-closure sort handler via functional setState updater All 13 tests pass; no new type errors. Test files unchanged.
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 source-level type errors across the monorepo. Four bugs spanning
packages/utils,packages/ui, andapps/web:useThrottlewas renamed touseDebouncein@e2e/utils, butapps/web/src/lib/api.tsstill imported the old name (causingTS2305and theuseSearchDebounceexport to be missing). Updated the import and re-export; the publicuseSearchDebouncealias is unchanged.formatDateforced US-style field order, producing01/03/2024. Switched toIntl.DateTimeFormat("en-AU", { dateStyle: "short" })so output is day-first (1/03/2024), matchingformatDateTimein the same module.aria-labelprop was destructured but never forwarded to the<button>. Now forwarded, with an accessible-name fallback for icon-only buttons that have no explicit label (WCAG 4.1.2) so an icon-only button always has a name.sortDirfrom a stale closure; switched to the functionalsetSortDir(prev => ...)updater form.Verification
bun run test-> 13 pass, 0 failtsc --noEmit-> no source-file type errorsAssumptions / notes
tscoutput isCannot find module 'bun:test'in four test files. This is pre-existing environment noise (present on the unmodified base commit) and the task forbids modifying test files — left untouched.