algebra
Version:
means completeness and balancing, from the Arabic word الجبر
19 lines (16 loc) • 417 B
JavaScript
/**
* Check if unary operator is static
*
* @param {Object} Scalar
* @param {String} operator name
* @param {*} operand
* @param {*} result expected
*
* @returns {Function} staticUnaryOperatorTest
*/
function staticUnaryOperator (Scalar, operator, operand, result) {
return function staticUnaryOperatorTest () {
Scalar[operator](operand).should.eql(result)
}
}
module.exports = staticUnaryOperator