File tree Expand file tree Collapse file tree 1 file changed +20
-1
lines changed Expand file tree Collapse file tree 1 file changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,26 @@ describe('findTheOldest', () => {
2121 ]
2222 expect ( findTheOldest ( people ) . name ) . toBe ( 'Ray' ) ;
2323 } ) ;
24- test ( 'finds the oldest person if yearOfDeath field is not present' , ( ) => {
24+ test . skip ( 'finds the oldest person if yearOfDeath field is undefined on a non-oldest person' , ( ) => {
25+ const people = [
26+ {
27+ name : "Carly" ,
28+ yearOfBirth : 2018 ,
29+ } ,
30+ {
31+ name : "Ray" ,
32+ yearOfBirth : 1962 ,
33+ yearOfDeath : 2011 ,
34+ } ,
35+ {
36+ name : "Jane" ,
37+ yearOfBirth : 1912 ,
38+ yearOfDeath : 1941 ,
39+ } ,
40+ ]
41+ expect ( findTheOldest ( people ) . name ) . toBe ( 'Ray' ) ;
42+ } ) ;
43+ test . skip ( 'finds the oldest person if yearOfDeath field is undefined for the oldest person' , ( ) => {
2544 const people = [
2645 {
2746 name : "Carly" ,
You can’t perform that action at this time.
0 commit comments