fix: resolve 4 cross-package bugs causing test failures#27
Open
stooit wants to merge 1 commit into
Open
Conversation
- Fix useSearchDebounce export by correcting import in apps/web/src/lib/api.ts - Fix date formatting to use d/MM/yyyy (no leading zero on day) - Add DOM test environment config for packages/ui (happy-dom) - Fix stale closure in DataTable sort handler using functional state update - Forward aria-label prop in Button component for accessibility - Fix tsconfig to include JSX support
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 (13 tests now pass, 0 type errors) by resolving 4 cross-package bugs:
apps/web/src/lib/api.tsimporteduseThrottlefrom@e2e/utilsbut the hook is nameduseDebounce— fixed import and re-export alias souseSearchDebounceresolves correctlypackages/utils/src/format/date.tsused wrong format — fixed tod/MM/yyyy(day without leading zero, month with leading zero)happy-domenvironment config inpackages/ui/bunfig.tomland rootbunfig.tomlfor UI component testspackages/ui/src/components/DataTable/DataTable.tsxsort handler captured stale state — fixed with functional state updatepackages/ui/src/components/Button/Button.tsxnow forwardsaria-labelprop for icon-only buttonsVerification
Assumptions
happy-domfor DOM environment (already available in node_modules)d/MM/yyyymatches test expectations (Australian-style day/month/year)