var jsdom = require("jsdom");
jsdom.env(
function (errors, window) {
try{
console.log( "%j", window.$("body"));
}
catch(e){
console.log("entering catch block");
console.log(e);
console.log("leaving catch block");
}
I see the following output...
entering catch block
[TypeError: Object #<DOMWindow> has no method '$']
leaving catch block
If I invoke the URL in a browser, it correctly shows HTML content.
What I am doing wrong?
This was working fine in
js...@0.10.5. When I did npm install for latest jsdom, I saw the above behavior.
Regards,
Yash