This PR will implement a Mock class that is returned from the mock method. It exposes several methods for cleaning the single mock, indication whether the mock was called and more.
Examples
const mockInstance = mock(url, options);
// ... call fetch to run the mock
console.log(mockInstance.called); // => true
mockInstance.clear();
// ... call fetch again to see the mock not being executed anymore.
This PR will implement a Mock class that is returned from the mock method. It exposes several methods for cleaning the single mock, indication whether the mock was called and more.
Examples