mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-27 21:03:29 +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 {render} from '@testing-library/react';
|
||||||
import App from './App';
|
import App from './App';
|
||||||
|
|
||||||
test('renders learn react link', () => {
|
test('renders App', () => {
|
||||||
const {getByText} = render(<App />);
|
const data = {
|
||||||
const linkElement = getByText(/learn react/i);
|
site: {
|
||||||
expect(linkElement).toBeInTheDocument();
|
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