Test cleanup and fixes [c-d]

This commit is contained in:
Angelos Chalaris
2018-06-18 16:34:04 +03:00
parent d29974ebc9
commit 105185c213
136 changed files with 805 additions and 484 deletions

View File

@ -1,12 +1,9 @@
const expect = require('expect');
const distance = require('./distance.js');
test('distance is a Function', () => {
test('distance is a Function', () => {
expect(distance).toBeInstanceOf(Function);
});
test('Calculates the distance between two points', () => {
expect(distance(1, 1, 2, 3), 2.23606797749979).toBe()
test('Calculates the distance between two points', () => {
expect(distance(1, 1, 2, 3)).toBeCloseTo(2.23606797749979, 5);
});