tests
This commit is contained in:
11
__tests__/AccountButtons.test.tsx
Normal file
11
__tests__/AccountButtons.test.tsx
Normal file
@@ -0,0 +1,11 @@
|
||||
import React from 'react';
|
||||
import { render, screen } from '@testing-library/react';
|
||||
import AccountButtons from '../src/components/account/AccountButtons.jsx';
|
||||
|
||||
describe('AccountButtons Component', () => {
|
||||
it('should render the AccountButtons component', () => {
|
||||
render(<AccountButtons registered={false} />);
|
||||
const accountButtonsElement = screen.getByRole('button', { name: /register/i });
|
||||
expect(accountButtonsElement).toBeInTheDocument();
|
||||
});
|
||||
});
|
||||
13
__tests__/helloworld.test.tsx
Normal file
13
__tests__/helloworld.test.tsx
Normal file
@@ -0,0 +1,13 @@
|
||||
import React from 'react';
|
||||
import { render, screen } from '@testing-library/react';
|
||||
|
||||
describe('Hello World Test', () => {
|
||||
it('should display hello world', () => {
|
||||
// Render a simple component
|
||||
render(<div>Hello World</div>);
|
||||
|
||||
// Check if "Hello World" is in the document
|
||||
const helloWorldElement = screen.getByText(/hello world/i);
|
||||
expect(helloWorldElement).toBeInTheDocument();
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user