Skip to content

Commit

Permalink
organizationCard tests migrated from jest to vitest (#2852)
Browse files Browse the repository at this point in the history
  • Loading branch information
abbi4code authored Dec 25, 2024
1 parent 4132c7d commit 00216ba
Showing 1 changed file with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,18 @@ import React from 'react';
import { render, screen } from '@testing-library/react';
import OrganizationCard from './OrganizationCard';

/**
* This file contains unit tests for the `OrganizationCard` component.
*
* The tests cover:
* - Rendering the component with all provided props and verifying the correct display of text elements.
* - Ensuring the component handles cases where certain props (like image) are not provided.
*
* These tests utilize the React Testing Library for rendering and querying DOM elements.
*/

describe('Testing the Organization Card', () => {
test('should render props and text elements test for the page component', () => {
it('should render props and text elements test for the page component', () => {
const props = {
id: '123',
image: 'https://via.placeholder.com/80',
Expand All @@ -20,7 +30,7 @@ describe('Testing the Organization Card', () => {
expect(screen.getByText(props.lastName)).toBeInTheDocument();
});

test('Should render text elements when props value is not passed', () => {
it('Should render text elements when props value is not passed', () => {
const props = {
id: '123',
image: '',
Expand Down

0 comments on commit 00216ba

Please sign in to comment.