From 5e44228070b96a66f99543d4bf811f1c0040e1ce Mon Sep 17 00:00:00 2001 From: rswade84 Date: Tue, 6 Aug 2024 13:18:16 -0500 Subject: [PATCH] Rover Test Update --- spec/rover.spec.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/spec/rover.spec.js b/spec/rover.spec.js index e29d782..3953613 100644 --- a/spec/rover.spec.js +++ b/spec/rover.spec.js @@ -87,7 +87,9 @@ describe('Rover class', () => { // Send the message and check if the rover's mode changed let response = rover.receiveMessage(message); + expect(rover.mode).toEqual('LOW_POWER'); + expect(response.results[0].completed).toEqual(true); }); @@ -106,7 +108,8 @@ describe('Rover class', () => { // Send the message and check if the MOVE command was not completed let response = rover.receiveMessage(message); - expect(response.results[1]).toEqual({ completed: false }); + expect(response.results[1].completed).toEqual(false); + expect(rover.position).toEqual(98382); }); @@ -122,5 +125,6 @@ describe('Rover class', () => { // Send the message and check if the rover's position updated let response = rover.receiveMessage(message); expect(rover.position).toEqual(2000); + expect(response.results[0].completed).toEqual(true); }); }); \ No newline at end of file