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
I'm trying to use fetch-mock in my mocha tess. The tests are put through webpack and then run via the mocha command in terminal. When I do this however, I get the following error related to requiring fetch-mock:
/built/bundle.js:8147
theGlobal: window,
^
ReferenceError: window is not defined
at Object.i (/Users/fabioberger/Projects/js/dali-client/tests/built/bundle.js:8147:14)
It seems that window is not defined when running the webpack generated bundle.js outside of the browser. Is there a work around to this?
Thanks!
The text was updated successfully, but these errors were encountered:
Hi,
I'm trying to use fetch-mock in my mocha tess. The tests are put through webpack and then run via the
mocha
command in terminal. When I do this however, I get the following error related to requiring fetch-mock:It seems that
window
is not defined when running the webpack generated bundle.js outside of the browser. Is there a work around to this?Thanks!
The text was updated successfully, but these errors were encountered: