When I tried to use unistore instead of redux in one of my pet projects, I discovered that its TypeScript typings are not very accurate. In this post I try to come up with better typings for unistore’s connect() function.
Jest: How to Mock window.location.href
There may be a situation where you need to mock methods or properties on window.location in Jest. However, because of peculiarities of jsdom, this could be challenging. In this post there is one of the possible solutions to this problem.