• Lukas Eipert's avatar
    Mock observers globally in Jest · ae0a4c9e
    Lukas Eipert authored
    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!
    ae0a4c9e
lazy_loader.js 5.48 KB