title: Cannot find module when using jest in nx
body: <p>I have an nx workspace that I am trying to move to jest.  At first I got an error about PointerEvent not being defined.  the proposed workaround for that was to do an Object.defineProperty(window, 'PointerEvent'...  My workspace has over 200 libraries so it was not realistic to add that in every single test-setup file so I created an npm package that defines it.  I import that in test-setup just like you would import jest-preset-angular.  it worked in the first 15 libraries I converted but the latest one throws this error when running tests.</p>
  <p><a href="https://i.stack.imgur.com/dqv87.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/dqv87.png" alt="enter image description here" /></a></p>
  <p>I have compared this lib to every other one I can think of and there is no difference.  I am completely out of ideas.  To say I am frustrated with this endeavor would be an understatement.  Hoping somebody out there has a large nx repo and has dealt with this. It seems every answer I get assumes I chose nx to only have one app and one or two libs.  I cannot provide a repo because this error is so random I have no idea how to reproduce it.  je-test-helper is in node_modules and as I stated every other identical usage of this works.</p>