mirror of
https://github.com/10h30/odin-javascript-exercises.git
synced 2026-06-05 15:09:09 +09:00
Update findTheOldest test to clear ambiguity
This commit is contained in:
@@ -21,7 +21,26 @@ describe('findTheOldest', () => {
|
||||
]
|
||||
expect(findTheOldest(people).name).toBe('Ray');
|
||||
});
|
||||
test('finds the oldest person if yearOfDeath field is not present', () => {
|
||||
test.skip('finds the oldest person if yearOfDeath field is undefined on a non-oldest person', () => {
|
||||
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 oldest person if yearOfDeath field is undefined for the oldest person', () => {
|
||||
const people = [
|
||||
{
|
||||
name: "Carly",
|
||||
|
||||
Reference in New Issue
Block a user