diff --git a/joi/src/core/TextArea/TextArea.test.tsx b/joi/src/core/TextArea/TextArea.test.tsx index 8bc64010f..e29eed5d0 100644 --- a/joi/src/core/TextArea/TextArea.test.tsx +++ b/joi/src/core/TextArea/TextArea.test.tsx @@ -1,9 +1,8 @@ import React from 'react' -import { render, screen } from '@testing-library/react' +import { render, screen, act } from '@testing-library/react' import '@testing-library/jest-dom' import { TextArea } from './index' -// Mock the styles import jest.mock('./styles.scss', () => ({})) describe('@joi/core/TextArea', () => { @@ -31,4 +30,40 @@ describe('@joi/core/TextArea', () => { const textareaElement = screen.getByTestId('custom-textarea') expect(textareaElement).toHaveAttribute('rows', '5') }) + + it('should auto resize the textarea based on minResize', () => { + render(