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

18 lines
495 B
TypeScript
Raw Normal View History

2019-09-17 14:30:26 +09:00
import React, {Suspense} from 'react';
2020-03-14 12:02:22 +09:00
import {render} from '@testing-library/react';
2020-02-05 15:59:53 +09:00
import {BrowserRouter as Router} from 'react-router-dom';
2019-09-17 14:30:26 +09:00
import App from './App';
2020-03-14 12:02:22 +09:00
import 'mutationobserver-shim';
2019-07-27 19:18:54 +09:00
2019-08-14 18:46:57 +09:00
it('renders welcome message', async () => {
2020-03-14 12:02:22 +09:00
const {findByText} = render(
2019-08-14 18:46:57 +09:00
<Suspense fallback={<div>loading</div>}>
2020-02-05 15:59:53 +09:00
<Router>
<App />
</Router>
2019-09-17 14:30:26 +09:00
</Suspense>,
);
2020-03-14 12:02:22 +09:00
const text = await findByText('Grab a slick name for your new app');
2019-09-17 14:30:26 +09:00
expect(text).toBeTruthy();
});