Skip to content

Add Unit Tests for useFocusVisible Hook #3

@manish3299

Description

@manish3299

Add Unit Tests for useFocusVisible Hook

Description:
Write unit tests for the useFocusVisible hook using React Testing Library.
Verify that:

  • The hook returns true when navigating with a keyboard.
  • The hook returns false when using a mouse.

Steps:

  1. Setup your test environment if you haven’t already.
  2. Create tests in a new file src/hooks/useFocusVisible.test.js.
  3. Mock events (keyboard vs. mouse) to test the hook behavior.
  4. Ensure the tests pass using npm run test.

Feel free to ask questions in this issue or drop by our discussion channel!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions