• Mark Florian's avatar
    Don't override existing toHaveLength matcher · 89c247f2
    Mark Florian authored
    The `toHaveLength` matcher in `custom-jquery-matchers` doesn't work as
    expected for generic Array-like objects with a `length` property,
    whereas Jest's version does.
    
    The reason is that the former wraps the value with jQuery, which only
    correctly wraps _some_ Array-like objects, like true arrays, `jQuery
    instances, `NodeList`s and `HTMLCollection`s.
    
    As such, Jest's version is more widely useful, and is otherwise
    equivalent, so it should be used instead.
    89c247f2
log_control_buttons_spec.js 2.91 KB