Skip to content

Debugging jest mocks

I’ve got a library that’s giving me some trouble in my jest tests. This library is included throughout my project, and it has an annoyingFunction that has a console.error in it. So, whenever I run a test, I naturally get unwanted console.error messages all over the place. I don’t want to moc…

Jquery not finding links

I have the following code with Jquery. I don’t know why the first link <a> is not getting selected but the last one? Anything wrong in my code, any fix? Answer The issue is because by using find() you’re telling jQuery to look for the selector you provide within the parent element. As the pa…

splide js pauseOn Hover option don’t have effect

I’m using splide js to create a sliding carousel, but the option pauseOnHover is not working. Because if you hover over the slider, it will stop sliding even I already set the option to be false pauseOnHover: false,. Answer Simply put your pauseOnHover inside autoScroll: {} to get what you want like so:…