Open Quadriphobs1 opened 6 years ago
@Quadriphobs1 Don't know if this is going to lead anywhere, but adding the following to jest.config.js at least resolves the compile error:
const window = {
addEventListener: () => {
},
removeEventListener: () => {
},
};
module.exports = {
...
"globals": {
"window": window,
...
},
};
Odd. I'm guessing that adding raven-for-redux
results in some Raven code which tries to use window.fetch
getting called. Do you have JS-DOM enabled in Jest?
Do you have a full stack trace you could share?
I installed the sentry package and integrated this package for redux which is working fine not until in started using the package on some component I have tested with jest and I keep getting a very weird error
TypeError: Cannot use 'in' operator to search for 'fetch' in true
which has to deal with raven.Now if i remove it from the component the test seems to go, any idea