(function () { 'use strict'; var env = require('jsdom').env , html = '

Hello World!

Heya Big World!' ; // first argument can be html string, filename, or url env(html, function (errors, window) { console.log(errors); var $ = require('jquery')(window) ; console.log($('.hello').text()); }); }());