Mock observers globally in Jest
As JSDom is missing global mocks for Observers, we currently need to mock observers manually in any spec that might use them under the hood. Our existing mocks are only working on _one_ instance of observers each, so we have refactored them to work on multiple instances as well. In order to improve the performance on tests where the Observers aren't tested, we add a NoopObserver to JSDom. As an aside, JSDom actually implements a MutationObserver, so no need to mock it!
Showing
Please register or sign in to comment