Skip to content

Commit

Permalink
fix specs
Browse files Browse the repository at this point in the history
  • Loading branch information
jalyna committed May 11, 2019
1 parent 49a7355 commit de64811
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/__tests__/calculateProgressOffset.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,31 +13,31 @@ describe('.calculateProgressOffset', () => {
it('changes x if left and in progress', () => {
const char = {
dir: Direction.Left,
progressFrame: 1
progressFrame: 2
} as any
expect(calculateProgressOffset(char)).toEqual({ x: -5, y: 0 })
})

it('changes x if right and in progress', () => {
const char = {
dir: Direction.Right,
progressFrame: 1
progressFrame: 2
} as any
expect(calculateProgressOffset(char)).toEqual({ x: 5, y: 0 })
})

it('changes y if up and in progress', () => {
const char = {
dir: Direction.Up,
progressFrame: 1
progressFrame: 2
} as any
expect(calculateProgressOffset(char)).toEqual({ x: 0, y: -5 })
})

it('changes y if down and in progress', () => {
const char = {
dir: Direction.Down,
progressFrame: 1
progressFrame: 2
} as any
expect(calculateProgressOffset(char)).toEqual({ x: 0, y: 5 })
})
Expand Down
2 changes: 1 addition & 1 deletion src/__tests__/drawChar.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ describe('.drawChar', () => {
y: 4
} as CharState
drawChar(ctx, img, charState)
expect(ctx.drawImage).toHaveBeenCalledWith(img, 64, 96, 32, 32, 40, 43, 32, 32)
expect(ctx.drawImage).toHaveBeenCalledWith(img, 64, 96, 32, 32, 40, 46, 32, 32)
})

it('draws name', () => {
Expand Down

0 comments on commit de64811

Please sign in to comment.