We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9b72ddf commit 2d729e7Copy full SHA for 2d729e7
src/globals.ts
@@ -1,19 +1,6 @@
1
import crypto from 'node:crypto'
2
3
-const webFetch = global.fetch
4
-
5
/** jest dose not use crypto in the global, but this is OK for node 18 */
6
if (typeof global.crypto === 'undefined') {
7
global.crypto = crypto as Crypto
8
}
9
10
-global.fetch = (info, init?) => {
11
- init = {
12
- // Disable compression handling so people can return the result of a fetch
13
- // directly in the loader without messing with the Content-Encoding header.
14
- compress: false,
15
- ...init,
16
- } as RequestInit
17
18
- return webFetch(info as RequestInfo, init)
19
-}
0 commit comments