Skip to content

test(shared): achieve 100% unit test coverage#34

Merged
zaewc merged 2 commits intodevelopfrom
test/shared-unit-test-coverage
Mar 28, 2026
Merged

test(shared): achieve 100% unit test coverage#34
zaewc merged 2 commits intodevelopfrom
test/shared-unit-test-coverage

Conversation

@zaewc
Copy link
Copy Markdown
Owner

@zaewc zaewc commented Mar 28, 2026

Add test files for canLoadPage and findMissingPages utilities, and extend useInfinitePages tests with abort signal edge cases. Update vitest config to exclude barrel index.ts files from coverage.

Closes #24

Add test files for canLoadPage and findMissingPages utilities,
and extend useInfinitePages tests with abort signal edge cases.
Update vitest config to exclude barrel index.ts files from coverage.

Closes #24

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@zaewc zaewc self-assigned this Mar 28, 2026
@github-actions
Copy link
Copy Markdown

📊 Test Coverage Report (vitest)

Package Statements Branches Functions Lines
@scrolloop/core 218/218 (100%) 53/53 (100%) 25/25 (100%) 218/218 (100%)
@scrolloop/react 420/715 (58.74%) 73/89 (82.02%) 5/17 (29.41%) 420/715 (58.74%)
@scrolloop/react-native 0/233 (0%) 1/4 (25%) 1/4 (25%) 0/233 (0%)
@scrolloop/shared 114/114 (100%) 39/39 (100%) 3/3 (100%) 114/114 (100%)

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces comprehensive unit tests for the useInfinitePages hook and the canLoadPage and findMissingPages utilities. It also refines the Vitest coverage configuration to exclude non-source files like configuration and test files from coverage reports. Feedback suggests reducing code duplication in the hook tests by using parameterized tests and improving consistency in the utility tests by reusing empty collection constants.

@github-actions
Copy link
Copy Markdown

📊 Test Coverage Report (vitest)

Package Statements Branches Functions Lines
@scrolloop/core 218/218 (100%) 53/53 (100%) 25/25 (100%) 218/218 (100%)
@scrolloop/react 420/715 (58.74%) 73/89 (82.02%) 5/17 (29.41%) 420/715 (58.74%)
@scrolloop/react-native 0/233 (0%) 1/4 (25%) 1/4 (25%) 0/233 (0%)
@scrolloop/shared 114/114 (100%) 39/39 (100%) 3/3 (100%) 114/114 (100%)

@zaewc zaewc merged commit faa36b6 into develop Mar 28, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

shared package unit test coverage 100%로 만들기

1 participant