Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
removes async from tests where not required
Browse files Browse the repository at this point in the history
  • Loading branch information
GoodGuyMarco committed Dec 8, 2022
1 parent 3b465e4 commit 57dbfa2
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions test/components/structures/AutocompleteInput-test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ describe('AutocompleteInput', () => {
getCompletions: jest.fn().mockImplementation(async () => data),
}) as unknown as AutocompleteProvider;

beforeEach(async () => {
beforeEach(() => {
TestUtils.stubClient();
});

Expand Down Expand Up @@ -67,7 +67,7 @@ describe('AutocompleteInput', () => {
expect(screen.getByTestId('autocomplete-matches').childNodes).toHaveLength(mockCompletion.length);
});

it('should render selected items passed in via props', async () => {
it('should render selected items passed in via props', () => {
const mockProvider = constructMockProvider(mockCompletion);
const onSelectionChangeMock = jest.fn();

Expand All @@ -85,7 +85,7 @@ describe('AutocompleteInput', () => {
expect(selection).toHaveLength(mockCompletion.length);
});

it('should call onSelectionChange() when an item is removed from selection', async () => {
it('should call onSelectionChange() when an item is removed from selection', () => {
const mockProvider = constructMockProvider(mockCompletion);
const onSelectionChangeMock = jest.fn();

Expand All @@ -110,7 +110,7 @@ describe('AutocompleteInput', () => {
expect(onSelectionChangeMock).toHaveBeenCalledWith([mockCompletion[1]]);
});

it('should render custom selection element when renderSelection() is defined', async () => {
it('should render custom selection element when renderSelection() is defined', () => {
const mockProvider = constructMockProvider(mockCompletion);
const onSelectionChangeMock = jest.fn();

Expand Down Expand Up @@ -186,7 +186,7 @@ describe('AutocompleteInput', () => {
suggestions.map(suggestion => expect(suggestion).toHaveClass('mx_AutocompleteInput_suggestion--selected'));
});

it('should remove the last added selection when backspace is pressed in empty input', async () => {
it('should remove the last added selection when backspace is pressed in empty input', () => {
const mockProvider = constructMockProvider(mockCompletion);
const onSelectionChangeMock = jest.fn();

Expand Down

0 comments on commit 57dbfa2

Please sign in to comment.