File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
src/components/Input/__test__ Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change 1
- import { render , screen , act } from "@testing-library/react" ;
1
+ import { render , screen } from "@testing-library/react" ;
2
2
import { userEvent } from '@testing-library/user-event' ;
3
3
import { Input } from ".." ;
4
- import { createRef } from 'react' ;
5
4
6
5
7
6
const props = { label : "Test" , message : "Test message" , id : "test" } ;
@@ -127,15 +126,15 @@ describe("Input", () => {
127
126
expect ( handleChange ) . toHaveBeenCalledTimes ( 5 ) ;
128
127
} ) ;
129
128
130
- it ( 'limits input length based on maxLength prop' , async ( ) => {
129
+ it ( 'limits input length based on maxLength prop' , async ( ) => {
131
130
render ( < Input
132
131
label = "Username"
133
132
shouldShowCounter
134
133
maxLength = { 5 }
135
134
/> ) ;
136
135
const input = screen . getByLabelText ( "Username" ) ;
137
136
await userEvent . type ( input , 'Too much input' ) ;
138
- expect ( input ) . toHaveProperty ( 'value' , 'Too m' )
137
+ expect ( input ) . toHaveProperty ( 'value' , 'Too m' )
139
138
} ) ;
140
139
141
140
it ( "should not display character counter if shouldShowCounter is false" , ( ) => {
You can’t perform that action at this time.
0 commit comments