fix: resolve cross-package test failures and type errors#61
Open
stooit wants to merge 1 commit into
Open
Conversation
- api.ts: import renamed useDebounce hook (was stale useThrottle), re-export as useSearchDebounce to match consumer test - date.ts: use locale dateStyle so day has no leading zero (en-AU/GB order) - Button.tsx: forward aria-label to the underlying button element - DataTable.tsx: fix stale closure on sort-direction toggle via functional update - tsconfig.json: wire up bun-types so bun:test globals type-check
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 5 failing tests and all 5
tsc --noEmiterrors in the monorepo. Bugs spanned all three packages.bun run test→ 13 pass / 0 fail;npx tsc --noEmit→ clean.Changes
apps/web/src/lib/api.tsuseThrottlehook was renamed touseDebouncein@e2e/utils, but the consumer still imported the old name (runtime crash + TS2305). Updated the import and re-exported it asuseSearchDebounceto match the consumer test.packages/utils/src/format/date.tsformatDateproduced a zero-padded day (01/03/2024); the test expects no leading zero (1/03/2024). Switched to a localedateStyleso field order and padding come from the locale.packages/ui/src/components/Button/Button.tsxaria-labelwas not forwarded to the underlying<button>. Now destructured and applied explicitly.packages/ui/src/components/DataTable/DataTable.tsxtsconfig.jsonbun-typestocompilerOptions.typessobun:testglobals resolve (already-installed dep; no new dependency).Verification
```
$ bun run test → 13 pass / 0 fail
$ npx tsc --noEmit → clean
```
Constraints honoured
bun-typeswas already present).🤖 Generated with QuantCode Agent