Closed learningcljs closed 8 years ago
Hi @learningcljs
If you are trying to use window
on node you are going to get the error. Depending on the functionality you need, you might want to mock it inwindow
. The error is not related to boot-cljs-test
but rather an inherent limitation of the runner. Is this the case?
What happend is when I used -e node
I got the ReferenceError: window is not defined
. I did not specifically try to use the window
object in node.js
.
I was just thinking that this could potentially be improved so that when node
is selected the window object
could be avoided preventing the error message.
Did some of your dependencies try to use the window
?
Mocking window
is not such a good idea since there is so much to mock, that the fact your dependency uses it is an indicator that it is not meant to run on Node.
@learningcljs you could eventually use this: https://www.npmjs.com/package/mock-browser but I never tested it.
Thanks @bensu @magomimmo
Unless the window
reference was in the inject test runner itself, this sounds like a project-level issue.
Thanks to the other vigilant and knowledgable followers for helping out 😄
For full context of when this error is happening please see magomimmo/modern-cljs#338.
It is my undertanding that node.js does not have a window object.