Merge pull request #4 from IgorVolochay/frontend
This commit is contained in:
@@ -1,8 +1,15 @@
|
||||
import { render, screen } from '@testing-library/react';
|
||||
import React, { act } from 'react';
|
||||
import { createRoot } from 'react-dom/client';
|
||||
import App from './App';
|
||||
|
||||
test('renders learn react link', () => {
|
||||
render(<App />);
|
||||
const linkElement = screen.getByText(/learn react/i);
|
||||
expect(linkElement).toBeInTheDocument();
|
||||
test('renders app without crashing', async () => {
|
||||
const container = document.createElement('div');
|
||||
document.body.appendChild(container);
|
||||
|
||||
await act(async () => {
|
||||
const root = createRoot(container);
|
||||
root.render(<App />);
|
||||
});
|
||||
|
||||
expect(container.innerHTML).toBeTruthy();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user