Skip to content

Commit ae81930

Browse files
Merge pull request #19 from Kalita-Roman/master
Add one more test case for 'getDistanceBetweenPoints'
2 parents ca48ccd + 281e9bd commit ae81930

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

task/02-numbers-tasks.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ function getAverage(value1, value2) {
7070
* (0,0) (0,1) => 1
7171
* (0,0) (1,0) => 1
7272
* (-5,0) (10,-10) => 18.027756377319946
73+
* (4, 2) (1, 6) => 5
7374
*/
7475
function getDistanceBetweenPoints(x1, y1, x2, y2) {
7576
throw new Error('Not implemented');

test/02-numbers-tests.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ describe('02-numbers-tasks', () => {
4343
assert.equal(getDistanceBetweenPoints(0, 0, 0, 1), 1);
4444
assert.equal(getDistanceBetweenPoints(0, 0, 1, 0), 1);
4545
assert.equal(getDistanceBetweenPoints(-5, 0, 10, -10), 18.027756377319946);
46+
assert.equal(getDistanceBetweenPoints(4, 2, 1, 6), 5);
4647
assert.linesOfCode(getDistanceBetweenPoints, 1);
4748
});
4849

0 commit comments

Comments
 (0)