ipfs/test/index.test.tsx

15 lines
421 B
TypeScript
Raw Normal View History

2019-12-08 17:27:44 +01:00
import React from 'react'
2021-09-12 21:21:18 +02:00
import { render, screen } from '@testing-library/react'
2021-09-13 23:55:29 +02:00
import Home from '../src/pages'
2019-12-08 17:27:44 +01:00
describe('Home', () => {
it('renders without crashing', async () => {
2021-09-12 20:57:02 +02:00
render(<Home />)
2021-09-13 23:55:29 +02:00
const online = await screen.findAllByTitle('Online', undefined, {
timeout: 10000
})
2021-09-12 21:21:18 +02:00
expect(screen.getByText('A public IPFS Gateway')).toBeInTheDocument()
2021-09-13 23:55:29 +02:00
expect(online).toBeDefined()
2019-12-08 17:27:44 +01:00
})
})