Revert "update cloning link"

This reverts commit 4c771f2e05.
This commit is contained in:
Tatiana
2021-05-08 11:25:04 -07:00
parent 60fe6c8b1f
commit 18cffeb940
1791 changed files with 7747 additions and 138307 deletions
-1
View File
@@ -7,4 +7,3 @@ given an array of objects representing people with a birth and death year, retur
- this can be done with a couple of chained array methods, or by using `reduce`.
- One of the tests checks for people with no death-date.. use JavaScript's Date function to get their age as of today.
+2 -4
View File
@@ -1,5 +1,3 @@
const findTheOldest = function() {
let findTheOldest = function () {};
}
module.exports = findTheOldest
module.exports = findTheOldest;
+26 -28
View File
@@ -1,64 +1,62 @@
const findTheOldest = require('./findTheOldest')
const findTheOldest = require("./findTheOldest");
describe('findTheOldest', () => {
test('finds the oldest person!', () => {
describe("findTheOldest", () => {
test("finds the oldest person!", () => {
const people = [
{
name: 'Carly',
name: "Carly",
yearOfBirth: 1942,
yearOfDeath: 1970,
},
{
name: 'Ray',
name: "Ray",
yearOfBirth: 1962,
yearOfDeath: 2011
yearOfDeath: 2011,
},
{
name: 'Jane',
name: "Jane",
yearOfBirth: 1912,
yearOfDeath: 1941
yearOfDeath: 1941,
},
]
expect(findTheOldest(people).name).toBe('Ray');
];
expect(findTheOldest(people).name).toBe("Ray");
});
test.skip('finds the oldest person if someone is still living', () => {
xit("finds the oldest person if someone is still living", function () {
const people = [
{
name: 'Carly',
name: "Carly",
yearOfBirth: 2018,
},
{
name: 'Ray',
name: "Ray",
yearOfBirth: 1962,
yearOfDeath: 2011
yearOfDeath: 2011,
},
{
name: 'Jane',
name: "Jane",
yearOfBirth: 1912,
yearOfDeath: 1941
yearOfDeath: 1941,
},
]
expect(findTheOldest(people).name).toBe('Ray');
];
expect(findTheOldest(people).name).toBe("Ray");
});
test.skip('finds the oldest person if the OLDEST is still living', () => {
xit("finds the oldest person if the OLDEST is still living", function () {
const people = [
{
name: 'Carly',
name: "Carly",
yearOfBirth: 1066,
},
{
name: 'Ray',
name: "Ray",
yearOfBirth: 1962,
yearOfDeath: 2011
yearOfDeath: 2011,
},
{
name: 'Jane',
name: "Jane",
yearOfBirth: 1912,
yearOfDeath: 1941
yearOfDeath: 1941,
},
]
expect(findTheOldest(people).name).toBe('Carly');
];
expect(findTheOldest(people).name).toBe("Carly");
});
});