lodash-fantasy
Version:
Fantasy Land compatible types built with lodash.
19 lines (15 loc) • 499 B
JavaScript
;
// Third Party
const curry = require("lodash/fp/curry");
module.exports = curry((expect, Type) =>
describe("Semigroup", () => {
it("should express associativity", () => {
const testValue = true;
const testLeft = new Type(testValue);
const testMiddle = new Type(testValue);
const testRight = new Type(testValue);
expect(testLeft.concat(testMiddle).concat(testRight))
.to.eql(testLeft.concat(testMiddle.concat(testRight)));
});
})
);