2019-09-17 14:30:26 +09:00
|
|
|
import React, {Suspense} from 'react';
|
|
|
|
import {render, waitForElement} from '@testing-library/react';
|
2019-08-14 18:46:57 +09:00
|
|
|
|
2019-09-17 14:30:26 +09:00
|
|
|
import App from './App';
|
2019-07-27 19:18:54 +09:00
|
|
|
|
2019-08-14 18:46:57 +09:00
|
|
|
it('renders welcome message', async () => {
|
2019-09-17 14:30:26 +09:00
|
|
|
const {getByText} = render(
|
2019-08-14 18:46:57 +09:00
|
|
|
<Suspense fallback={<div>loading</div>}>
|
|
|
|
<App />
|
2019-09-17 14:30:26 +09:00
|
|
|
</Suspense>,
|
|
|
|
);
|
|
|
|
const text = await waitForElement(() => getByText('name new project'));
|
|
|
|
expect(text).toBeTruthy();
|
|
|
|
});
|