fix: repair cross-package bugs to make test suite pass#39
Open
stooit wants to merge 1 commit into
Open
Conversation
- api.ts: import renamed useDebounce hook (was stale useThrottle) - Button: forward aria-label to the rendered button element - DataTable: use functional state updater to fix stale-closure sort toggle - date.ts: use dateStyle:'short' so en-AU yields day-first dates - bunfig.toml / packages/ui/bunfig.toml: apply happy-dom env + preload for component tests - tsconfig.json: register bun-types so tsc resolves bun:test globals
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 type errors across the monorepo.
bun test(13 pass / 0 fail) andtsc --noEmit(clean) now both succeed from the repo root.The bugs spanned all three packages plus the test-environment config.
Changes
apps/web/src/lib/api.tsuseThrottleafter it was renamed touseDebouncein@e2e/utilsuseDebounce(still surfaced asuseSearchDebounce)packages/ui/src/components/Button/Button.tsxariaLabelprop destructured but never appliedaria-labelto the rendered<button>packages/ui/src/components/DataTable/DataTable.tsxsortDirfrom the closuresetSortDir(prev => ...)packages/utils/src/format/date.tsmonth/day/yearoptions forced US MM/DD/YYYY, overridingen-AU{ dateStyle: 'short' }so en-AU yields day-first DD/MM/YYYYpackages/ui/bunfig.tomldocument is not definedenvironment = "happy-dom"(keeppreload)bunfig.tomltsconfig.jsontsccould not resolvebun:testglobalsbun-typesVerification
bun test→ 13 pass, 0 failtsc --noEmit→ clean (exit 0)Assumptions
useThrottle → useDebounceis the intended source name; the public aliasuseSearchDebounce(asserted by tests) is preserved.Constraints honoured