fix: resolve all failing tests across monorepo packages#21
Open
stooit wants to merge 1 commit into
Open
Conversation
- Fix renamed hook: export useSearchDebounce from @e2e/utils via api.ts - Fix Button accessibility: pass aria-label prop through to button element - Fix DataTable stale closure: use functional state update in sort handler - Fix date formatting: use 'd/MM/yyyy' (no leading zero) for day format - Fix DOM test environment: add happy-dom preload for bun test runner
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
useSearchDebounceexport from@e2e/utils— the hook was renamed touseDebounceinpackages/utilsbut consumers still imported the old name. Updatedapps/web/src/lib/api.tsto importuseDebounceand re-export asuseSearchDebounce.aria-labelprop passthrough inpackages/ui/src/components/Button/Button.tsxso icon-only buttons have accessible names.packages/ui/src/components/DataTable/DataTable.tsxto use functional state update, preventing stale closure on re-renders.packages/utils/src/format/date.tsfromdd/MM/yyyytod/MM/yyyyto produce day without leading zero.bunfig.tomlso@testing-library/reacttests have a DOM environment.Verification
All 13 tests pass. No source-code type errors (only expected
bun:testmodule errors in test files).Assumptions
bun:testTS2307 errors are expected since bun provides the module at runtime but tsc doesn't have type declarations for it — these are test-file-only and don't affect source.environmentkey in bunfig.toml.