front/__tests__/AccountButtons.test.tsx

12 lines
432 B
TypeScript
Raw Normal View History

2024-10-19 07:48:30 +03:00
import React from 'react';
import { render, screen } from '@testing-library/react';
import AccountButtons from '../src/components/account/AccountButtons.jsx';
describe('AccountButtons Component', () => {
2024-10-19 10:28:37 +03:00
it('should render the Back link', () => {
2024-10-19 07:48:30 +03:00
render(<AccountButtons registered={false} />);
2024-10-19 10:28:37 +03:00
const backLinkElement = screen.getByRole('link', { name: /back/i });
expect(backLinkElement).toBeInTheDocument();
2024-10-19 07:48:30 +03:00
});
});