Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
specify('should support Either type', function() {
const eitherR = monet.Either.Right(1);
const eitherL = monet.Either.Left(2);
assert.strictEqual(RA.cata(null, R.identity, eitherR), 1);
assert.strictEqual(RA.cata(R.identity, null, eitherL), 2);
});
specify('should return value from Right', function() {
const eitherR = monet.Either.Right(1);
assert.throws(RA.cata.bind(null, R.identity, null, eitherR), TypeError);
assert.strictEqual(RA.cata(null, R.identity, eitherR), 1);
});
});