@@ -8,7 +8,7 @@ import faker from "faker";
88import uuid from "uuid" ;
99
1010describe ( "SelectFormField" , ( ) => {
11- test ( "when default props, renders SelectFormField with label" , ( ) => {
11+ test ( "when default props, renders with label" , ( ) => {
1212 // Arrange
1313 const label = faker . random . words ( ) ;
1414 const selectLabel = faker . random . word ( ) ;
@@ -28,10 +28,11 @@ describe("SelectFormField", () => {
2828 expect ( getByText ( label ) ) . not . toBeNil ( ) ;
2929 } ) ;
3030
31- test ( "when has errorsMessages prop, renders select form field with error message " , ( ) => {
31+ test ( "when has errorsMessages prop, renders with error messages " , ( ) => {
3232 // Arrange
3333 const expected = faker . random . words ( ) ;
34- const testErrorMessage = faker . random . words ( ) ;
34+ const firstErrorMessage = faker . random . words ( ) ;
35+ const secondErrorMessage = faker . random . words ( ) ;
3536 const selectLabel = faker . random . word ( ) ;
3637 const selectValue = faker . random . word ( ) ;
3738
@@ -41,16 +42,17 @@ describe("SelectFormField", () => {
4142 label = { expected }
4243 onChange = { ( ) => { } }
4344 id = { uuid ( ) }
44- errorMessages = { [ testErrorMessage ] }
45+ errorMessages = { [ firstErrorMessage , secondErrorMessage ] }
4546 values = { [ { value : selectValue , label : selectLabel } ] }
4647 />
4748 ) ;
4849
4950 // Assert
50- expect ( getByText ( testErrorMessage ) ) . not . toBeNil ( ) ;
51+ expect ( getByText ( firstErrorMessage ) ) . not . toBeNil ( ) ;
52+ expect ( getByText ( secondErrorMessage ) ) . not . toBeNil ( ) ;
5153 } ) ;
5254
53- test ( "when has errorsMessage prop, renders select form field with error message" , ( ) => {
55+ test ( "when has errorsMessage prop, renders with error message" , ( ) => {
5456 // Arrange
5557 const expected = faker . random . words ( ) ;
5658 const testErrorMessage = faker . random . words ( ) ;
0 commit comments