'Jasmine testing for a guess the number function
I'm new to StackOverflow and was hoping to clear a doubt I have with regards to Jasmine testing for the following:
I have a JavaScript function called guessTheNumber where the secretNumber is set to 4 (data type is number).
Would it be correct to input the number as a string and expect the result to be successful for my test to pass case? Is that the correct way to go about unit testing your function?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
