From 381cfd21f0042213e566df64acd4fb3f4b25826c Mon Sep 17 00:00:00 2001 From: John vente Date: Tue, 2 Jan 2024 08:34:44 -0500 Subject: [PATCH] test: format tests --- .../communications-app/IndividualEmails/api.test.js | 4 ++-- .../IndividualEmails/index.test.jsx | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/plugins/communications-app/IndividualEmails/api.test.js b/plugins/communications-app/IndividualEmails/api.test.js index 4609e34a..6e0537b2 100644 --- a/plugins/communications-app/IndividualEmails/api.test.js +++ b/plugins/communications-app/IndividualEmails/api.test.js @@ -27,7 +27,7 @@ describe('getLearnersEmailInstructorTask', () => { }); }); - it('successfully fetches data', async () => { + test('successfully fetches data', async () => { const data = await getLearnersEmailInstructorTask(mockCourseId, mockSearch); expect(data).toEqual(mockResponseData); expect(getAuthenticatedHttpClient().get).toHaveBeenCalledWith( @@ -35,7 +35,7 @@ describe('getLearnersEmailInstructorTask', () => { ); }); - it('handles an error', async () => { + test('handles an error', async () => { getAuthenticatedHttpClient().get.mockRejectedValue(new Error('Network error')); await expect(getLearnersEmailInstructorTask(mockCourseId, mockSearch)).rejects.toThrow('Network error'); diff --git a/plugins/communications-app/IndividualEmails/index.test.jsx b/plugins/communications-app/IndividualEmails/index.test.jsx index fad1c904..6d79a027 100644 --- a/plugins/communications-app/IndividualEmails/index.test.jsx +++ b/plugins/communications-app/IndividualEmails/index.test.jsx @@ -34,7 +34,7 @@ describe('IndividualEmails Component', () => { ); - it('renders the component without errors', () => { + test('renders the component without errors', () => { render( @@ -42,7 +42,7 @@ describe('IndividualEmails Component', () => { ); }); - it('displays the correct internationalized messages', () => { + test('displays the correct internationalized messages', () => { render( @@ -62,7 +62,7 @@ describe('IndividualEmails Component', () => { expect(screen.getByTestId('learners-email-list-label')).toHaveTextContent(individualEmailsLabelLearnersListLabel.defaultMessage); }); - it('renders the component with main components ', () => { + test('renders the component with main components ', () => { render( @@ -78,7 +78,7 @@ describe('IndividualEmails Component', () => { expect(emailListLabel).toBeInTheDocument(); }); - it('should render two email chips', () => { + test('should render two email chips', () => { render( @@ -89,7 +89,7 @@ describe('IndividualEmails Component', () => { expect(emailChips).toHaveLength(2); }); - it('triggers search on typing in search box', async () => { + test('triggers search on typing in search box', async () => { const mockHandleEmailSelected = jest.fn(); const mockCourseId = 'course123'; render( @@ -111,7 +111,7 @@ describe('IndividualEmails Component', () => { }); }); - it('invokes handleDeleteEmail when clicking on delete icons', () => { + test('invokes handleDeleteEmail when clicking on delete icons', () => { const mockHandleDeleteEmail = jest.fn(); render(