Replies: 1 comment
-
Thanks for pointing this out, I have experienced this too and it makes our jest tests very hard to debug. We seem to get the correct name of the failing test but the line numbers are from a different test. I tried using node-fetch but it doesn't cover the full range of changes that remix 'installGlobals' does. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
This is not necessarily an issue in Remix but posting this here since there doesn't seem to be any other reports about this.
It seems that if you use
to add global Fetch and Request / Response classes in Jest line numbering in expectation / assertion messages will be off.
No sure why this happens because
installGlobals()
doesn't seem to do anything related to it:remix/packages/remix-node/globals.ts
Lines 44 to 59 in 5b8a0ce
For my use case I was able to just import the Request class from
node-fetch
.Beta Was this translation helpful? Give feedback.
All reactions