Groups
Groups
Sign in
Groups
Groups
Mocha
Conversations
About
Send feedback
Help
mocha commnad giving ReferenceError: window is not defined
1,033 views
Skip to first unread message
jit
unread,
Dec 3, 2015, 1:37:12 AM
12/3/15
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Mocha
I am using below command
mocha --compilers :./test/babel-setup.js --recursive --watch
giving below error:
ReferenceError: window is not defined
in babel-setup.js below code is there.
require("babel/register")({
compact: false
});
i am using node 0.12.7 and "mocha": "^2.2.5" and "jsdom": "^3.1.2". am i missing sonething?
Vlad GURDIGA
unread,
Dec 31, 2015, 9:04:54 AM
12/31/15
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Mocha
Hey jit,
My guess is that your test setup or code is expecting a browser environment, and If that’s true, I’d try to look into Phantomjs.
Cheers!
Reply all
Reply to author
Forward
0 new messages