@stewartmac/lotide
Version:
Modular collection of functions that operate on data, namely Arrays and Objects.
17 lines (13 loc) • 380 B
JavaScript
const assert = require('chai').assert;
const head = require('../head');
describe("#head", () => {
it("should return 1 for [1,2,3]", () => {
assert.strictEqual(head([1,2,3]), 1);
});
it("should returns '5' for ['5']", () => {
assert.strictEqual(head(['5']), '5');
});
it("should returns undefined for []", () => {
assert.isUndefined(head([]));
});
});