1
0
mirror of https://github.com/uetchy/namae.git synced 2025-07-01 22:10:04 +09:00
namae/web/src/App.test.tsx

15 lines
391 B
TypeScript
Raw Normal View History

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();
});