Merge branch 'main' into km-testing-jest-2

This commit is contained in:
Marvin Gay
2021-05-17 18:56:52 -04:00
committed by GitHub
6 changed files with 17 additions and 21 deletions
+15 -16
View File
@@ -4,19 +4,19 @@ 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');
@@ -24,18 +24,18 @@ describe('findTheOldest', () => {
test.skip('finds the oldest person if someone is still living', () => {
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');
@@ -43,21 +43,20 @@ describe('findTheOldest', () => {
test.skip('finds the oldest person if the OLDEST is still living', () => {
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');
});
});