Skip to content

Commit

Permalink
Rover Test Update
Browse files Browse the repository at this point in the history
  • Loading branch information
rswade84 committed Aug 6, 2024
1 parent 68cf9fa commit 5e44228
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion spec/rover.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});


Expand All @@ -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);
});


Expand All @@ -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);
});
});

0 comments on commit 5e44228

Please sign in to comment.