test tweak

This commit is contained in:
Matthias Kretschmann 2021-09-12 21:21:18 +02:00
parent 4fabd65c86
commit 06cfdca8e7
Signed by: m
GPG Key ID: 606EEEF3C479A91F
1 changed files with 3 additions and 3 deletions

View File

@ -1,11 +1,11 @@
import React from 'react'
import { render, waitFor, screen } from '@testing-library/react'
import { render, screen } from '@testing-library/react'
import Home from '../pages'
describe('Home', () => {
it('renders without crashing', async () => {
render(<Home />)
await waitFor(() => screen.getAllByTitle('Online').length === 2)
expect(screen.getAllByTitle('Online').length).toBe(2)
await screen.findAllByTitle('Online', undefined, { timeout: 10000 })
expect(screen.getByText('A public IPFS Gateway')).toBeInTheDocument()
})
})