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