Merge branch 'origin/master' into 'jest'

This commit is contained in:
Marvin Gay
2021-05-12 21:45:11 -04:00
16 changed files with 129 additions and 122 deletions
+23 -24
View File
@@ -1,63 +1,62 @@
const findTheOldest = require('./findTheOldest')
let findTheOldest = require('./findTheOldest')
describe('findTheOldest', () => {
test('finds the oldest person!', () => {
describe('findTheOldest', function() {
it('finds the oldest person!', function() {
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).toEqual('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).toEqual('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).toEqual('Carly');
});
});