Skip to content

Commit 381cfd2

Browse files
committed
test: format tests
1 parent 7abeacf commit 381cfd2

2 files changed

Lines changed: 8 additions & 8 deletions

File tree

plugins/communications-app/IndividualEmails/api.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,15 @@ describe('getLearnersEmailInstructorTask', () => {
2727
});
2828
});
2929

30-
it('successfully fetches data', async () => {
30+
test('successfully fetches data', async () => {
3131
const data = await getLearnersEmailInstructorTask(mockCourseId, mockSearch);
3232
expect(data).toEqual(mockResponseData);
3333
expect(getAuthenticatedHttpClient().get).toHaveBeenCalledWith(
3434
`http://localhost/platform-plugin-communications/${mockCourseId}/api/search_learners?query=${mockSearch}&page=1&page_size=10`,
3535
);
3636
});
3737

38-
it('handles an error', async () => {
38+
test('handles an error', async () => {
3939
getAuthenticatedHttpClient().get.mockRejectedValue(new Error('Network error'));
4040

4141
await expect(getLearnersEmailInstructorTask(mockCourseId, mockSearch)).rejects.toThrow('Network error');

plugins/communications-app/IndividualEmails/index.test.jsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,15 @@ describe('IndividualEmails Component', () => {
3434
</IntlProvider>
3535
);
3636

37-
it('renders the component without errors', () => {
37+
test('renders the component without errors', () => {
3838
render(
3939
<IntlProviderWrapper>
4040
<IndividualEmails />
4141
</IntlProviderWrapper>,
4242
);
4343
});
4444

45-
it('displays the correct internationalized messages', () => {
45+
test('displays the correct internationalized messages', () => {
4646
render(
4747
<IntlProviderWrapper>
4848
<IndividualEmails emailList={mockEmailList} />
@@ -62,7 +62,7 @@ describe('IndividualEmails Component', () => {
6262
expect(screen.getByTestId('learners-email-list-label')).toHaveTextContent(individualEmailsLabelLearnersListLabel.defaultMessage);
6363
});
6464

65-
it('renders the component with main components ', () => {
65+
test('renders the component with main components ', () => {
6666
render(
6767
<IntlProviderWrapper>
6868
<IndividualEmails courseId="123" emailList={mockEmailList} />
@@ -78,7 +78,7 @@ describe('IndividualEmails Component', () => {
7878
expect(emailListLabel).toBeInTheDocument();
7979
});
8080

81-
it('should render two email chips', () => {
81+
test('should render two email chips', () => {
8282
render(
8383
<IntlProviderWrapper>
8484
<IndividualEmails courseId="123" emailList={mockEmailList} />
@@ -89,7 +89,7 @@ describe('IndividualEmails Component', () => {
8989
expect(emailChips).toHaveLength(2);
9090
});
9191

92-
it('triggers search on typing in search box', async () => {
92+
test('triggers search on typing in search box', async () => {
9393
const mockHandleEmailSelected = jest.fn();
9494
const mockCourseId = 'course123';
9595
render(
@@ -111,7 +111,7 @@ describe('IndividualEmails Component', () => {
111111
});
112112
});
113113

114-
it('invokes handleDeleteEmail when clicking on delete icons', () => {
114+
test('invokes handleDeleteEmail when clicking on delete icons', () => {
115115
const mockHandleDeleteEmail = jest.fn();
116116
render(
117117
<IntlProviderWrapper>

0 commit comments

Comments
 (0)