I'm new to JSMockito but can't really seem to find a guide which shows exactly what steps should be taken when going about using it to test some of my JavaScript methods/objects. The official website for JSMockito didn't really help my understanding of this.
If I had this method which divides a by b:
function myDivision(a,b) {
return a / b;
}
How would I go about testing it with JSMockito? i.e. do I need to import/initialise anything, how do I initialise a mock, assert a test etc?
Likewise, how would I go about testing objects too?
Any help would be much appreciated, thanks!
Aucun commentaire:
Enregistrer un commentaire