Skip to content

Instantly share code, notes, and snippets.

@jasongorman
Created September 26, 2020 09:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jasongorman/eb154bc96799900550be51cbc0a3cf57 to your computer and use it in GitHub Desktop.
Save jasongorman/eb154bc96799900550be51cbc0a3cf57 to your computer and use it in GitHub Desktop.
[{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