Skip to content

Commit

Permalink
Update header tests for consistency.
Browse files Browse the repository at this point in the history
  • Loading branch information
jbouder committed Oct 6, 2023
1 parent d3f231f commit d026143
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/components/header/header.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ describe('Header', () => {
expect(window.location.pathname).toBe('/dashboard');
});

it('should handle sign in', async () => {
test('should handle sign in', async () => {
jest.spyOn(useAuthMock, 'default').mockReturnValue({
isSignedIn: false,
currentUserData: {} as User,
Expand All @@ -63,7 +63,7 @@ describe('Header', () => {
});
});

it('should handle sign out', async () => {
test('should handle sign out', async () => {
jest.spyOn(useAuthMock, 'default').mockReturnValue({
isSignedIn: true,
currentUserData: {} as User,
Expand Down Expand Up @@ -98,14 +98,14 @@ describe('Header', () => {
expect(baseElement.querySelector('.usa-nav')).toBeDefined();
});

it('renders without errors', () => {
test('should render menu successfully', () => {
render(headerComponent);

expect(screen.getByText('Skip to main content')).toBeTruthy();
expect(screen.getByText('Menu')).toBeTruthy();
});

it('toggles the menu on button click', () => {
test('should toggle the menu on button click', () => {
render(headerComponent);

const menuButton = screen.getByText('Menu');
Expand Down

0 comments on commit d026143

Please sign in to comment.