Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert spied fakeTimers to original state
When sandbox.useFakeTimers() is called, the original setTimeout and other methods are replaced with fake methods. When such fake method is spied it's replaced again with another fake. To make sure that sandbox.restore() reverts setTimeout and other methods to the original state these fakes should be restored in reverse order to make sure each fake is restored to its predecessor when calling fake.restore().
- Loading branch information
Showing
2 changed files
with
12 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters