Skip to content
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

About, Demo and Faq test files #532

Open
wants to merge 2 commits into
base: monorepo_setup
Choose a base branch
from
Open

Conversation

abhishek-2k23
Copy link

Summary

This PR adds unit tests for the About, Demo, and Faq components in the ui package to maintain test coverage and ensure stability. Each component now has a dedicated test file with test cases verifying rendering, props handling, and expected behavior.

Approach

  1. Test File Creation:
    Created separate test files for each component under the tests folder:
  • About.test.jsx
  • Demo.test.jsx
  • Faq.test.jsx
  1. Test Cases:
  • About Component: Added 2 test cases to verify rendering and props handling.
  • Demo Component: Added 4 test cases to verify rendering, props handling, and interaction behavior.
  • Faq Component: Added 3 test cases to verify rendering, props handling, and dynamic content display.
  1. Testing Framework: Used Vitest for writing and running the tests, following the existing test patterns in the UI package.

  2. Coverage: Ensured that the test coverage aligns with the project standards by testing all critical functionalities of the components.

How to Test the Changes

  • To test: pnpm --filter ui test
  • To get the full coverage: pnpm --filter ui coverge

Screenshots or Recordings

image
image

Checklist

  • I have added/updated tests that cover the changes.
  • I have updated the documentation to reflect the changes.

@abhishek-2k23 abhishek-2k23 linked an issue Feb 4, 2025 that may be closed by this pull request
2 tasks
Copy link

sonarqubecloud bot commented Feb 4, 2025

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.

Add unit test for About, Demo and Faq ui component
1 participant