I've looked at the official website for JSMockito but I'm having trouble following/understanding what steps should be taken. i.e. it doesn't say how to install JSMockito/JSHamcrest or how to import it into my JS script. I just wanted to know how to test a simple object and function...
So, if I had this method which just takes two integers and divides one by the other:
function myDivision(a,b) {
return a / b;
}
How would I go about testing it with JSMockito? i.e. do I need to import anything, how do I initialise a mock, assert a test etc.?
Likewise, how would I go about testing an object too?
Any help would be much appreciated! Thanks!
Aucun commentaire:
Enregistrer un commentaire