-
-
Save jasongorman/7302d741c6a903881fb23813bdc386cf to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
it("turns right from N to E", () => { | |
let rover = {facing: "N"}; | |
rover = go(rover, "R"); | |
assert.equal(rover.facing, "E"); | |
}) | |
it("turns right from E to S", () => { | |
let rover = {facing: "E"}; | |
rover = go(rover, "R"); | |
assert.equal(rover.facing, "S"); | |
}) | |
it("turns right from S to W", () => { | |
let rover = {facing: "S"}; | |
rover = go(rover, "R"); | |
assert.equal(rover.facing, "W"); | |
}) | |
it("turns right from W to N", () => { | |
let rover = {facing: "W"}; | |
rover = go(rover, "R"); | |
assert.equal(rover.facing, "N"); | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment