I'm getting the following error when running Jest tests:
/Users/hugo/src/feedback/www/assets/app/node_modules/superagent/lib/node/index.js: /Users/hugo/src/feedback/www/assets/app/node_modules/superagent/node_modules/debug/node.js: Cannot read property 'buffer' of undefined
If Jest automatically mocks out dependencies, shouldn't any file that requires superagent
just get the mock of superagent
? All the functions I have that even make an http request using it have been mocked out to just return test data without making the request. I don't understand why I'm getting the error.
UPDATE
I tried the manual mock found here. It still gives me the same error.