mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-27 04:43:12 +03:00
Fixed basic top-level App test
This commit is contained in:
parent
5b18b464d1
commit
909eb16ced
@ -2,8 +2,18 @@ import React from 'react';
|
||||
import {render} from '@testing-library/react';
|
||||
import App from './App';
|
||||
|
||||
test('renders learn react link', () => {
|
||||
const {getByText} = render(<App />);
|
||||
const linkElement = getByText(/learn react/i);
|
||||
expect(linkElement).toBeInTheDocument();
|
||||
test('renders App', () => {
|
||||
const data = {
|
||||
site: {
|
||||
siteUrl: '',
|
||||
adminUrl: ''
|
||||
}
|
||||
};
|
||||
const {container} = render(
|
||||
<App data={data} />
|
||||
);
|
||||
|
||||
// dashboard component should be rendered on root route
|
||||
const element = container.querySelector('.App');
|
||||
expect(element).toBeInTheDocument();
|
||||
});
|
Loading…
Reference in New Issue
Block a user