Files
30-seconds-of-code/test/median/median.test.js
Angelos Chalaris 9217979f80 Updated testing with proper indentation
Uses two spaces instead of hard tabs.
2018-01-24 17:53:36 +02:00

15 lines
625 B
JavaScript

const test = require('tape');
const median = require('./median.js');
test('Testing median', (t) => {
//For more information on all the methods supported by tape
//Please go to https://github.com/substack/tape
t.true(typeof median === 'function', 'median is a Function');
t.equal(median([5, 6, 50, 1, -5]), 5, "Returns the median of an array of numbers");
t.equal(median([1, 2, 3]), 2, "Returns the median of an array of numbers");
//t.deepEqual(median(args..), 'Expected');
//t.equal(median(args..), 'Expected');
//t.false(median(args..), 'Expected');
//t.throws(median(args..), 'Expected');
t.end();
});