mirror of
https://github.com/uetchy/namae.git
synced 2025-03-17 12:30:32 +09:00
chore: fix test
This commit is contained in:
parent
18b32127c2
commit
503d314e98
@ -1,16 +1,23 @@
|
|||||||
import { render } from '@testing-library/react';
|
import { render } from '@testing-library/react';
|
||||||
|
import { StoreProvider } from 'easy-peasy';
|
||||||
import 'mutationobserver-shim';
|
import 'mutationobserver-shim';
|
||||||
import React, { Suspense } from 'react';
|
import React from 'react';
|
||||||
import { BrowserRouter as Router } from 'react-router-dom';
|
import { BrowserRouter } from 'react-router-dom';
|
||||||
|
import { ToastContainer } from 'react-toastify';
|
||||||
import App from './App';
|
import App from './App';
|
||||||
|
import { store } from './store';
|
||||||
|
import { FullScreenSuspense } from './util/suspense';
|
||||||
|
|
||||||
it('renders welcome message', async () => {
|
it('renders welcome message', async () => {
|
||||||
const { findByText } = render(
|
const { findByText } = render(
|
||||||
<Suspense fallback={<div>loading</div>}>
|
<StoreProvider store={store}>
|
||||||
<Router>
|
<FullScreenSuspense>
|
||||||
<App />
|
<BrowserRouter>
|
||||||
</Router>
|
<App />
|
||||||
</Suspense>
|
</BrowserRouter>
|
||||||
|
</FullScreenSuspense>
|
||||||
|
<ToastContainer />
|
||||||
|
</StoreProvider>
|
||||||
);
|
);
|
||||||
const text = await findByText('Grab a slick name for your new app');
|
const text = await findByText('Grab a slick name for your new app');
|
||||||
expect(text).toBeTruthy();
|
expect(text).toBeTruthy();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user