-
Notifications
You must be signed in to change notification settings - Fork 0
test(COMPT-33): consolidate all hook tests into src/hooks/__tests__/ #10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| --- | ||
| '@ciscode/hooks-kit': patch | ||
| --- | ||
|
|
||
| test(COMPT-33): full test suite for all 12 hooks | ||
|
|
||
| - Consolidate all hook tests under src/hooks/__tests__/ | ||
| - Cover all 12 hooks: useDebounce, useLocalStorage, useSessionStorage, | ||
| useMediaQuery, useWindowSize, useClickOutside, useIntersectionObserver, | ||
| usePrevious, useToggle, useInterval, useTimeout, useIsFirstRender | ||
| - Use vitest fake timers for useDebounce, useInterval, useTimeout, useWindowSize | ||
| - Verify all acceptance criteria per COMPT-33 definition of done | ||
| - Coverage ≥ 85% lines across all hooks | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -19,8 +19,8 @@ | |
|
|
||
| - **State & Storage** (COMPT-30 ✅) — `useDebounce`, `useLocalStorage`, `useSessionStorage` | ||
| - **DOM & Events** (COMPT-31 ✅) — `useMediaQuery`, `useWindowSize`, `useClickOutside`, `useIntersectionObserver` | ||
| <<<<<<< HEAD | ||
| - **Async & Lifecycle** (COMPT-32 ✅) — `usePrevious`, `useToggle`, `useInterval`, `useTimeout`, `useIsFirstRender` | ||
| - **Test Suite** (COMPT-33 ✅) — Full coverage for all 12 hooks, all tests in `src/hooks/__tests__/` | ||
|
|
||
|
Comment on lines
20
to
24
|
||
| ### Module Responsibilities: | ||
|
|
||
|
|
@@ -54,7 +54,20 @@ src/ | |
| │ ├── useInterval.ts # COMPT-32 ✅ | ||
| │ ├── useTimeout.ts # COMPT-32 ✅ | ||
| │ ├── useIsFirstRender.ts # COMPT-32 ✅ | ||
| │ └── index.ts # Hook barrel | ||
| │ ├── index.ts # Hook barrel | ||
| │ └── __tests__/ # All hook tests (COMPT-33 ✅) | ||
| │ ├── useDebounce.test.ts | ||
| │ ├── useLocalStorage.test.ts | ||
| │ ├── useSessionStorage.test.ts | ||
| │ ├── useMediaQuery.test.ts | ||
| │ ├── useWindowSize.test.ts | ||
| │ ├── useClickOutside.test.ts | ||
| │ ├── useIntersectionObserver.test.ts | ||
| │ ├── usePrevious.test.ts | ||
| │ ├── useToggle.test.ts | ||
| │ ├── useInterval.test.ts | ||
| │ ├── useTimeout.test.ts | ||
| │ └── useIsFirstRender.test.ts | ||
| ├── utils/ # Framework-agnostic utils | ||
| │ ├── noop.ts | ||
| │ └── index.ts | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This release note says the test suite covers “all 12 hooks”, but the package currently exports another hook (
useNoop) publicly. Please either includeuseNoopin this list/coverage statement, or adjust exports so the “12 hooks” claim is accurate.