Skip to content

Instantly share code, notes, and snippets.

@jasongorman
Created September 26, 2020 09:38
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/7302d741c6a903881fb23813bdc386cf to your computer and use it in GitHub Desktop.
Save jasongorman/7302d741c6a903881fb23813bdc386cf to your computer and use it in GitHub Desktop.
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