mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-26 12:21:36 +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