-
-
Save jasongorman/38b84f28795025ad53aab3ffa715bbf3 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
[ | |
{startsFacing: "N", endsFacing: "E"}, | |
{startsFacing: "E", endsFacing: "S"}, | |
{startsFacing: "S", endsFacing: "W"}, | |
{startsFacing: "W", endsFacing: "N"} | |
].forEach( | |
function ({startsFacing, endsFacing}) { | |
it("turns right", () => { | |
let rover = {facing: startsFacing}; | |
rover = go(rover, "R"); | |
assert.equal(rover.facing, endsFacing); | |
}) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment