Skip to content

Commit

Permalink
corrected route for sign in link
Browse files Browse the repository at this point in the history
correction for sign up page unit test
  • Loading branch information
LilithLucifer3x6 committed Jun 9, 2024
1 parent 5385c70 commit 4d0c74a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/unit/auth/sign-up/page.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ describe('Sign up page tests', () => {
// Arrange
beforeEach(() => {
jest.clearAllMocks();
// eslint-disable-next-line testing-library/no-render-in-lifecycle
render(<SignUp />)
})
it('render contains title, submit button, and sign in link', () => {
Expand All @@ -28,14 +29,14 @@ describe('Sign up page tests', () => {
}
})

it('sign in link direct to localhost /auth/sign-up route', () => {
it('sign in link direct to localhost /auth/sign-in route', () => {
// Arrange
const signinLink = screen.getByRole('link', { name: /sign in/i })

// Act
fireEvent.click(signinLink)

// Assert
expect(signinLink).toHaveProperty('href', 'http://localhost/auth/sign-up')
expect(signinLink).toHaveProperty('href', 'http://localhost/auth/sign-in')
})
})

0 comments on commit 4d0c74a

Please sign in to comment.