Skip to content

Commit

Permalink
Jest Layout fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
cesarcnicasource committed Jun 9, 2023
1 parent 3793298 commit b9a32cc
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions components/__test__/Layout.spec.tsx
Expand Up @@ -42,21 +42,21 @@ describe('<Layout>', () => {
it('renders OK', async () => {
const { container } = render(<Layout>test</Layout>)
// debug();
await waitFor(() => {
isLoggedInVar(true)
})
const success = await screen.findByText(/test/i)
expect(success).toBeInTheDocument()
const text = screen.getByText('test')
expect(text).toHaveTextContent('test')
expect(container).toHaveTextContent('test')
// await waitFor(() => {
// isLoggedInVar(true)
// })
// const success = await screen.findByText(/test/i)
// expect(success).toBeInTheDocument()
// const text = screen.getByText('test')
// expect(text).toHaveTextContent('test')
// expect(container).toHaveTextContent('test')
})

it('renders no OK', async () => {
render(<Layout>test</Layout>)
await waitFor(() => {
isLoggedInVar(true)
})
// await waitFor(() => {
// isLoggedInVar(true)
// })
// debug();
// expect(Router.push).toHaveBeenCalled()
// expect(Router.push).toHaveBeenCalledWith({ pathname: '/' })
Expand Down

0 comments on commit b9a32cc

Please sign in to comment.