Skip to content

test(mobile): add missing SSR environment tests#346

Open
eunwoo-levi wants to merge 5 commits intotoss:mainfrom
eunwoo-levi:test/add-ssr-tests-mobile-hooks
Open

test(mobile): add missing SSR environment tests#346
eunwoo-levi wants to merge 5 commits intotoss:mainfrom
eunwoo-levi:test/add-ssr-tests-mobile-hooks

Conversation

@eunwoo-levi
Copy link

@eunwoo-levi eunwoo-levi commented Mar 12, 2026

Overview

Problem

4 hooks in @react-simplikit/mobile were missing .ssr.test.ts files, which are required by the
project's contributing guidelines for all hooks that access browser APIs.

Solution

Add SSR environment tests (@vitest-environment node) for the 4 hooks, following the same pattern
as the existing SSR tests.

Hooks added in this PR

  • useNetworkStatus
  • usePageVisibility
  • useAvoidKeyboard
  • useKeyboardHeight

Additional Fix

  • Found that @vitest/coverage-v8 was missing from @react-simplikit/mobile devDependencies,
    while the coverage config already existed in vitest.config.ts. Added the missing dependency.

Checklist

  • Did you write the test code?
  • Have you run yarn run fix to format and lint the code and docs?
  • Have you run yarn run test:coverage to make sure there is no uncovered line?
  • Did you write the JSDoc?

eunwoo-levi and others added 4 commits March 13, 2026 05:07
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.

1 participant