Fix BlogPostsCell test
This commit is contained in:
@@ -20,7 +20,12 @@ describe('BlogPostsCell', () => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
test('Success renders successfully', async () => {
|
test('Success renders successfully', async () => {
|
||||||
render(<Success blogPosts={standard().blogPosts} />)
|
const posts = standard().posts
|
||||||
expect(screen.getByText(/42/i)).toBeInTheDocument()
|
render(<Success posts={posts} />)
|
||||||
|
|
||||||
|
expect(screen.getByText(posts[0].title)).toBeInTheDocument()
|
||||||
|
expect(screen.getByText(posts[0].body)).toBeInTheDocument()
|
||||||
|
expect(screen.getByText(posts[1].title)).toBeInTheDocument()
|
||||||
|
expect(screen.getByText(posts[1].body)).toBeInTheDocument()
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user