I was trying to set up the environment properly so that my tests run with
node test/runner.js
Unfortunately, everything ends up with an error when jQuery couldn't find a window object. I tried different approaches, one of which was using jsdom:
var jsdom = require("jsdom").jsdom;
JS.ENV.window = jsdom().createWindow()
JS.ENV.document = JS.ENV.window.document;
In this case tests passed, however I saw json string as output in the terminal instead of pretty green messages and I suspect this was because I changed the window object.
Then I saw there's a "js.class/source/dom" directory with some files relatd to DOM, but I'm not sure how all this is supposed to work, there's nothing about it in documentation.
I also saw the stubbing technique used in test's examples in documentation, but that's not gonna help me in my case, because I'm not making any ajax-requests and I really need jQuery functionality.
Surely, there must be a way to run JS.Test specs and use jQuery?