Fixed error in expect statements

Changed expect(findTheOldest(people).name).toBe('Ray'); to
expect(findTheOldest(people)).toBe('Ray');
This commit is contained in:
Rusty 2021-08-31 11:34:32 +05:30 committed by GitHub
parent 137636a425
commit 29740f27a5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -19,7 +19,7 @@ describe('findTheOldest', () => {
yearOfDeath: 1941, yearOfDeath: 1941,
}, },
] ]
expect(findTheOldest(people).name).toBe('Ray'); expect(findTheOldest(people)).toBe('Ray');
}); });
test.skip('finds the oldest person if someone is still living', () => { test.skip('finds the oldest person if someone is still living', () => {
const people = [ const people = [
@ -38,7 +38,7 @@ describe('findTheOldest', () => {
yearOfDeath: 1941, yearOfDeath: 1941,
}, },
] ]
expect(findTheOldest(people).name).toBe('Ray'); expect(findTheOldest(people)).toBe('Ray');
}); });
test.skip('finds the oldest person if the OLDEST is still living', () => { test.skip('finds the oldest person if the OLDEST is still living', () => {
const people = [ const people = [
@ -57,6 +57,6 @@ describe('findTheOldest', () => {
yearOfDeath: 1941, yearOfDeath: 1941,
}, },
] ]
expect(findTheOldest(people).name).toBe('Carly'); expect(findTheOldest(people)).toBe('Carly');
}); });
}); });