Files
frontend-app-learner-dashboard/src/containers/CourseCard/components/CourseCardBanners/RelatedProgramsBanner/ProgramsList.test.jsx
2024-01-30 12:31:34 +05:00

24 lines
576 B
JavaScript

import { shallow } from '@edx/react-unit-test-utils';
import { ProgramsList } from './ProgramsList';
describe('ProgramsList', () => {
const programs = [
{
programUrl: 'http://example.com',
title: 'Example Program 1',
},
{
programUrl: 'http://example.com',
title: 'Example Program 2',
},
];
it('renders correctly', () => {
const wrapper = shallow(<ProgramsList programs={programs} />);
expect(wrapper.snapshot).toMatchSnapshot();
expect(wrapper.instance.findByType('li').length).toEqual(programs.length);
});
});