dimanche 16 août 2020

How to find how many times a method was called in JavaScript

A test has a dependency on database.query(). During the test the dependency is replaced with an object called database with the method, query that returns an array. Which two test approaches can be used to verify how many times the method was called and the argument used each time?

1.Integration 2.Mocking 3.Whitebox 4.Blackbox

Aucun commentaire:

Enregistrer un commentaire