Code coverage report for lib/sum.js

Statements: 100% (4 / 4)      Branches: 100% (6 / 6)      Functions: 100% (1 / 1)      Lines: 100% (4 / 4)     

All files » lib/ » sum.js
1 2 3 4 5 6 71 5 3   2    
module.exports = function (a, b) {
    if (isNaN(a) || typeof a !== 'number' || isNaN(b) || typeof b !== 'number') {
        throw new TypeError('a and b should be numbers');
    }
    return a + b;
};