8000 12_findTheOldest fix ambiguity and remove redundant test description · josh-Fen/javascript-exercises@f3a6283 · GitHub
[go: up one dir, main page]

Skip to content

Commit f3a6283

Browse files
committed
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.
1 parent 77363aa commit f3a6283

File tree

1 file changed

+1
-20
lines changed

1 file changed

+1
-20
lines changed

12_findTheOldest/findTheOldest.spec.js

Lines changed: 1 addition & 20 deletions
DC39 Original file line numberDiff line numberDiff line change
@@ -21,26 +21,7 @@ describe('findTheOldest', () => {
2121
]
2222
expect(findTheOldest(people).name).toBe('Ray');
2323
});
24-
test.skip('finds the person with the greatest age if someone is still living', () => {
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 person with the greatest age if the OLDEST is still living', () => {
24+
test('finds the oldest person if yearOfDeath field is not present', () => {
4425
const people = [
4526
{
4627
name: "Carly",

0 commit comments

Comments
 (0)
0