12_findTheOldest fix ambiguity and remove redundant test description

fix ambiguity in test description , old was 'finds the person with the
greatest age if someone is still living.'
remove redundant test that checks for 'finds the person with the
greatest age if the OLDEST is still living' since both this and the
above test for ability to check if there is no death year field.
This commit is contained in:
DonRehan
2024-01-23 21:16:03 +02:00
parent 77363aa547
commit f3a6283a93
+1 -20
View File
@@ -21,26 +21,7 @@ describe('findTheOldest', () => {
]
expect(findTheOldest(people).name).toBe('Ray');
});
test.skip('finds the person with the greatest age if someone is still living', () => {
const people = [
{
name: "Carly",
yearOfBirth: 2018,
},
{
name: "Ray",
yearOfBirth: 1962,
yearOfDeath: 2011,
},
{
name: "Jane",
yearOfBirth: 1912,
yearOfDeath: 1941,
},
]
expect(findTheOldest(people).name).toBe('Ray');
});
test.skip('finds the person with the greatest age if the OLDEST is still living', () => {
test('finds the oldest person if yearOfDeath field is not present', () => {
const people = [
{
name: "Carly",