Skip to content

Commit

Permalink
fix: 500 - tests after review
Browse files Browse the repository at this point in the history
  • Loading branch information
KristiBo committed Sep 11, 2024
1 parent 9556147 commit 799489e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/widgets/angular-topics/ui/angular-topics.test.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { render, screen } from '@testing-library/react';
import { describe, expect, it } from 'vitest';
import { AngularTopics } from './angular-topics';
import { topicsList } from '../constants';

describe('AngularTopics component', () => {
it('renders without crashing', () => {
Expand All @@ -18,10 +19,11 @@ describe('AngularTopics component', () => {
expect(title).toHaveTextContent('Topics Covered:');
});

it('displays topics list', () => {
it('displays the topics list with correct text', () => {
render(<AngularTopics />);
const list = screen.getByTestId('list');

expect(list).toBeVisible();
expect(list).toHaveTextContent(topicsList.join(''));
});
});

0 comments on commit 799489e

Please sign in to comment.