Commit a9b20860 authored by Stefanie Hasler's avatar Stefanie Hasler

tcr

parent 755537ef
......@@ -9,7 +9,7 @@ class MarsRover {
return `${this.x},${this.y},${this.dir}`
}
north(): MarsRover {
forward(): MarsRover {
this.y++
return this
}
......@@ -33,8 +33,8 @@ describe("MarsRover", () => {
expect(new MarsRover().pos()).to.equal('0,0,N')
})
it('should move north', () => {
expect(new MarsRover().north().pos()).to.equal('0,1,N')
it('should move forward', () => {
expect(new MarsRover().forward().pos()).to.equal('0,1,N')
})
it('should turn right', () => {
......@@ -49,7 +49,7 @@ describe("MarsRover", () => {
expect(new MarsRover().right().right().right().pos()).to.equal('0,0,W')
})
it('should turn right four times, then point north', () => {
it('should turn right four times, then point forward', () => {
expect(new MarsRover().right().right().right().right().pos()).to.equal('0,0,N')
})
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment