Skip to content

Commit

Permalink
Добавлен дополнительный тест для Coin, проверяющий что она прыгает от…
Browse files Browse the repository at this point in the history
…носительно исходной позиции
  • Loading branch information
dfitiskin committed Jan 9, 2018
1 parent 76b9b32 commit f3e5aa2
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions test/coin.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,18 @@ describe('Класс Coin', () => {

expect(newPosition).to.eql(realPosition.plus(springVector));
});

it('Увеличивается вектор исходной позиции, а не текущей', () => {
const coin = new Coin(position);
const realPosition = coin.pos;

coin.pos = coin.getNextPosition();

const newPosition = coin.getNextPosition();
const springVector = coin.getSpringVector();

expect(newPosition).to.eql(realPosition.plus(springVector));
});
});

describe('Метод act', () => {
Expand Down

0 comments on commit f3e5aa2

Please sign in to comment.