Created
June 8, 2017 17:18
-
-
Save bmorelli25/a1be71dc1e071ea7b9c8dbdd89277a6e to your computer and use it in GitHub Desktop.
Mocha Testing - v2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let convert = {}; | |
convert.cToF = function(celsius) { | |
if(!Number.isInteger(celsius)) return undefined; | |
return celsius * 9 / 5 + 32; | |
} | |
convert.fToC = function(fahrenheit) { | |
if(!Number.isInteger(fahrenheit)) return undefined; | |
return (fahrenheit - 32) * 5 / 9; | |
} | |
module.exports = convert; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment