Files
30-seconds-of-code/test/factorial/factorial.test.js
Stefan Feješ a5d14af485 add 2 tests, factorial and fibonacci
NOTE: factorial doesn't work, see the issues tab for more info
2018-01-10 17:17:57 +01:00

14 lines
549 B
JavaScript

const test = require('tape');
const factorial = require('./factorial.js');
test('Testing factorial', (t) => {
//For more information on all the methods supported by tape
//Please go to https://github.com/substack/tape
t.true(typeof factorial === 'function', 'factorial is a Function');
t.equal(factorial(6), 720, "Calculates the factorial of a number");
//t.deepEqual(factorial(args..), 'Expected');
//t.equal(factorial(args..), 'Expected');
//t.false(factorial(args..), 'Expected');
//t.throws(factorial(args..), 'Expected');
t.end();
});