title: Types definitions aren't loading when executing Jest tests
body: <p>I'm building an open-source library of test utilities which also includes custom tech matches. But when creating test files and running them, a lot of errors are being raised regarding type definitions.</p>
  <p>Refer to the following errors when running <code>yarn test</code><a href="https://i.stack.imgur.com/IFSkb.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/IFSkb.png" alt="enter image description here" /></a></p>
  <p>The errors are related to two different type definitions, which are:</p>
  <ul>
  <li><code>toBeVisible</code> is a custom Jest matcher that should come from <code>@testing-library/jest-dom</code></li>
  <li><code>toHaveQueryParam</code> is a custom Jest matcher created internally at my package and which I declared the definitions inside <code>@types/jest.d.ts</code> - This type definition should be loaded with <a href="https://www.typescriptlang.org/docs/handbook/declaration-merging.html" rel="nofollow noreferrer">declaration merging</a>, but I presume it's not working due to the errors.</li>
  </ul>
  <p>My question is: Why the type definitions aren't loading? I presume that there should be something wrong regarding the TS compiler or Jest configs</p>
  <p><a href="https://github.com/LauraBeatris/react-router-testing-utils/pull/3" rel="nofollow noreferrer">PR with the tests code</a></p>