Skip to content

Commit

Permalink
Update Textarea.test.tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
zignis committed Sep 8, 2022
1 parent aca149d commit 3836305
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions packages/mui-joy/src/Textarea/Textarea.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,21 @@ describe('Joy <Textarea />', () => {
expect(screen.getByTestId('end')).toBeVisible();
});

it('should pass props to Textarea', () => {
const { container } = render(
<Textarea
componentsProps={{
textarea: {
maxLength: 5,
},
}}
/>,
);

const textarea = container.querySelector('textarea')!;
expect(textarea).to.have.attr('maxlength', '5');
});

describe('prop: disabled', () => {
it('should have disabled classes', () => {
const { container } = render(<Textarea disabled />);
Expand Down

0 comments on commit 3836305

Please sign in to comment.