issue-148 Clean up files with "2" in them

resolves #148
This commit is contained in:
Kurt Hutten
2020-12-12 15:13:31 +11:00
parent ba0c80d91a
commit 278add82a6
31 changed files with 235 additions and 261 deletions

View File

@@ -0,0 +1,26 @@
import { render, screen } from '@redwoodjs/testing'
import { Loading, Empty, Failure, Success } from './PartCell'
import { standard } from './PartCell.mock'
describe('PartCell', () => {
test('Loading renders successfully', () => {
render(<Loading />)
// Use screen.debug() to see output
expect(screen.getByText('Loading...')).toBeInTheDocument()
})
test('Empty renders successfully', async () => {
render(<Empty />)
expect(screen.getByText('Empty')).toBeInTheDocument()
})
test('Failure renders successfully', async () => {
render(<Failure error={new Error('Oh no')} />)
expect(screen.getByText(/Oh no/i)).toBeInTheDocument()
})
test('Success renders successfully', async () => {
render(<Success part={standard().part} />)
expect(screen.getByText(/42/i)).toBeInTheDocument()
})
})