Uplift sinon
to 19+
#9768
Labels
Dependencies
Update the project's dependencies/libraries
Type: Technical issue
Improve something that users won't notice
Describe the issue
Sinon 19 changed the way
useFakeTimes
works so that calling that function ends up automatically mocking a bunch of stuff.In some of our tests, it does not work to have everything mocked (particularly, I have observed issues when mocking
nextTick
when using@medic/memdown
). One solution is to just limit which functions are mocked.So, you might have original test code that looks like this:
To fix it, use the
toFake
option to include only the actual functions that need to be faked for your test.FTR, here are the list of all the valid function names I know of:
The text was updated successfully, but these errors were encountered: