Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
fix: update unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
Szymon Brud committed Feb 18, 2024
1 parent 8a08795 commit 56d6d6e
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/components/Hello/Hello.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@ import React from 'react';
import { render, screen } from '../../test-utils';
import { Hello } from './Hello';

test('renders learn react link', () => {
const SAMPLE_TEXT = 'abcd';
describe('Hello component', () => {
test('Should render text', () => {
const SAMPLE_TEXT = 'abcd';

render(<Hello text={SAMPLE_TEXT} />);
const element = screen.getByText(SAMPLE_TEXT);
expect(element).toBeInTheDocument();
render(<Hello text={SAMPLE_TEXT} />);
const element = screen.getByText(SAMPLE_TEXT);
expect(element).toBeInTheDocument();
});
});

0 comments on commit 56d6d6e

Please sign in to comment.