You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I couldn't make this package work on nodejs to mock 'node-fetch' package.
Could you give me some directions so that I can contribute to make this package work for nodejs too ?
Thanks!
[updates]
I found this configuration works with nodejs
package.json
"jset": {
"testEnvironment": "node",
//setupJest.js
import fetch from 'jest-fetch-mock'
jest.setMock('node-fetch', fetch)
The problem now is that Request and Response are not present in nodejs
I think it could be cool if this package could read jest configuration,
then if testEnvironment == node , use Request and Response polyfills/mocks
The text was updated successfully, but these errors were encountered:
Hi, I couldn't make this package work on nodejs to mock 'node-fetch' package.
Could you give me some directions so that I can contribute to make this package work for nodejs too ?
Thanks!
[updates]
I found this configuration works with nodejs
package.json
The problem now is that
Request
andResponse
are not present innodejs
I think it could be cool if this package could read jest configuration,
then if testEnvironment == node , use Request and Response polyfills/mocks
The text was updated successfully, but these errors were encountered: