@@ -11,17 +11,17 @@ describe('listUsers', () => {
1111 { id : 'id1' , name : 'Sara' } ,
1212 { id : 'id2' , name : 'Jane' } ,
1313 ] )
14- ) . toBe ( 'Sara and Jane' ) ;
14+ ) . toBe ( 'Sara, Jane' ) ;
1515 } ) ;
1616
1717 it ( 'should return correct result if user has no name, the fallback should be id' , ( ) => {
1818 expect ( listUsers ( [ { id : 'id1' } , { id : 'id2' , name : 'Jane' } ] ) ) . toBe (
19- 'id1 and Jane'
19+ 'id1, Jane'
2020 ) ;
2121 } ) ;
2222
2323 it ( `should return the correct result if called with one user` , ( ) => {
24- expect ( listUsers ( [ { id : 'id2' , name : 'Jane' } ] ) ) . toBe ( 'Jane ' ) ;
24+ expect ( listUsers ( [ { id : 'id2' , name : 'Jane' } ] ) ) . toBe ( 'Jane' ) ;
2525 } ) ;
2626
2727 it ( 'should return the correct result if called with more than two users, but less or equal than five' , ( ) => {
@@ -33,7 +33,7 @@ describe('listUsers', () => {
3333 { id : 'id5' , name : 'John' } ,
3434 ] ;
3535
36- expect ( listUsers ( readBy ) ) . toBe ( 'Bob, Sophie, Jack, John, and Rose ' ) ;
36+ expect ( listUsers ( readBy ) ) . toBe ( 'Bob, Sophie, Jack, Rose, John ' ) ;
3737 } ) ;
3838
3939 it ( 'should return the correct result if called with more than five users' , ( ) => {
@@ -46,6 +46,6 @@ describe('listUsers', () => {
4646 { id : 'id6' , name : 'Adam' } ,
4747 ] ;
4848
49- expect ( listUsers ( readBy ) ) . toBe ( 'Bob, Sophie, Jack, Rose, John and 1 more ' ) ;
49+ expect ( listUsers ( readBy ) ) . toBe ( 'Bob, Sophie, Jack, Rose, John +1 ' ) ;
5050 } ) ;
5151} ) ;
0 commit comments