Files
30-seconds-of-code/test/head/head.test.js
2018-01-10 16:23:35 +01:00

14 lines
491 B
JavaScript

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