Closed niyobern closed 3 weeks ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
dynamites-ecomm-fe | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Jun 7, 2024 2:51pm |
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 17.24%. Comparing base (
1d4ea43
) to head (48e241f
).
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Description:
This PR introduces testing setup for our Vite + React + TypeScript project. The goal is to ensure that our components and business logic function as expected, and to catch any potential issues before they reach production.
Changes:
@testing-library/react
as dev dependencies.Test:
The test checks if the [App]() component renders a paragraph with the text 'Welcome to Dynamites E-commerce'. This is done by rendering the [App]() component and then using [screen.getByRole('paragraph')]() to find the paragraph element. The [toHaveTextContent]() assertion is then used to check if the paragraph contains the expected text.
Impact:
This change doesn't affect the existing functionality of the application but provides a foundation for writing more comprehensive tests in the future. This will help us ensure the quality and reliability of our application as we continue to develop and add new features.
How to Test:
After pulling the changes, run
to test the App component