From 29740f27a5503c367a862280febe5be8161e4884 Mon Sep 17 00:00:00 2001 From: Rusty Date: Tue, 31 Aug 2021 11:34:32 +0530 Subject: [PATCH] Fixed error in expect statements Changed expect(findTheOldest(people).name).toBe('Ray'); to expect(findTheOldest(people)).toBe('Ray'); --- 12_findTheOldest/findTheOldest.spec.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/12_findTheOldest/findTheOldest.spec.js b/12_findTheOldest/findTheOldest.spec.js index 06aec70..cd82f4c 100644 --- a/12_findTheOldest/findTheOldest.spec.js +++ b/12_findTheOldest/findTheOldest.spec.js @@ -19,7 +19,7 @@ describe('findTheOldest', () => { yearOfDeath: 1941, }, ] - expect(findTheOldest(people).name).toBe('Ray'); + expect(findTheOldest(people)).toBe('Ray'); }); test.skip('finds the oldest person if someone is still living', () => { const people = [ @@ -38,7 +38,7 @@ describe('findTheOldest', () => { 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', () => { const people = [ @@ -57,6 +57,6 @@ describe('findTheOldest', () => { yearOfDeath: 1941, }, ] - expect(findTheOldest(people).name).toBe('Carly'); + expect(findTheOldest(people)).toBe('Carly'); }); });