jest: added restoreAllMocks

This commit is contained in:
firsttris
2017-09-20 19:49:04 +02:00
parent 6c121d8c2f
commit 02323b5357

View File

@@ -62,8 +62,10 @@ declare namespace jest {
function resetAllMocks(): typeof jest;
/**
* available in Jest 20.1.0+
* Restores all mocks back to their original value. Equivalent to calling .mockRestore on every mocked function.
* Beware that jest.restoreAllMocks() only works when mock was created with jest.spyOn; other mocks will require you to manually restore them.
* Restores all mocks back to their original value.
* Equivalent to calling .mockRestore on every mocked function.
* Beware that jest.restoreAllMocks() only works when mock was created with
* jest.spyOn; other mocks will require you to manually restore them.
*/
function restoreAllMocks(): typeof jest;
/**