Something broken in latest jsdom

30 views
Skip to first unread message

Yash Ganthe

unread,
Jun 20, 2014, 10:31:52 AM6/20/14
to js...@googlegroups.com
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


Reply all
Reply to author
Forward
0 new messages