File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
src/molecules/form-fields Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -20,25 +20,27 @@ describe("TextAreaFormField", () => {
2020 expect ( getByLabelText ( expected ) ) . not . toBeNull ( ) ;
2121 } ) ;
2222
23- test ( "when has errorMessages prop, renders text area form field with error message " , ( ) => {
23+ test ( "when has errorMessages prop, renders with error messages " , ( ) => {
2424 // Arrange
2525 const expected = faker . random . words ( ) ;
26- const testErrorMessage = faker . random . words ( ) ;
26+ const firstErrorMessage = faker . random . words ( ) ;
27+ const secondErrorMessage = faker . random . words ( ) ;
2728
2829 // Act
2930 const { getByText } = render (
3031 < TextAreaFormField
3132 label = { expected }
3233 onChange = { ( ) => { } }
33- errorMessages = { [ testErrorMessage ] }
34+ errorMessages = { [ firstErrorMessage , secondErrorMessage ] }
3435 />
3536 ) ;
3637
3738 // Assert
38- expect ( getByText ( testErrorMessage ) ) . not . toBeNil ( ) ;
39+ expect ( getByText ( firstErrorMessage ) ) . not . toBeNil ( ) ;
40+ expect ( getByText ( secondErrorMessage ) ) . not . toBeNil ( ) ;
3941 } ) ;
4042
41- test ( "when has errorMessage prop, renders text area form field with error message" , ( ) => {
43+ test ( "when has errorMessage prop, renders with error message" , ( ) => {
4244 // Arrange
4345 const expected = faker . random . words ( ) ;
4446 const testErrorMessage = faker . random . words ( ) ;
You can’t perform that action at this time.
0 commit comments