Skip to content

Commit 63ce8d1

Browse files
committed
refactor unit tests
1 parent 8cae75e commit 63ce8d1

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

__tests__/AutosizeInput.test.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,9 @@ test('input has functional, optional ARIA attributes', async () => {
5353
};
5454

5555
const { getByTestId } = renderAutosizeInput(props);
56-
const verifyAriaAttrs = ['aria-label', 'aria-labelledby', 'aria-autocomplete'];
56+
const ariaAttrs = ['aria-label', 'aria-labelledby', 'aria-autocomplete'];
5757

58-
verifyAriaAttrs.forEach((attr: string) => {
58+
ariaAttrs.forEach((attr: string) => {
5959
expect(getByTestId(AUTOSIZE_INPUT_TESTID!)).toHaveAttribute(attr);
6060
});
6161
});

__tests__/Value.test.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,10 @@ test('"renderOptionLabel" callback should be executed when an option is selected
7070
const selectedOption = getSelectedOptionSingle();
7171
const props = { ...BASE_PROPS, selectedOption };
7272
const { getByText } = renderValue(props);
73+
7374
expect(renderOptionLabelSpy).toHaveBeenCalledTimes(1);
7475

75-
selectedOption.forEach((option: SelectedOption) => {
76-
const { label } = option;
76+
selectedOption.forEach(({ label }: SelectedOption) => {
7777
expect(getByText(String(label))).toBeInTheDocument();
7878
});
7979
});

0 commit comments

Comments
 (0)