jsdom    = require('jsdom')
window   = jsdom.jsdom().createWindow();
document = window.document;
global.document.implementation.createHTMLDocument = function (html, url) {
    return jsdom.html(html);
};

$ = jQuery = require('jquery');

$('body').html('<div id="fixtures"></div>');

jsdom    = require('jsdom')
window   = jsdom.jsdom().createWindow();
document = window.document;
global.document.implementation.createHTMLDocument = function (html, url) {
    return jsdom.html(html);
};

global.location = { href: '' };

$ = jQuery = require('jquery');

$('body').html('<div id="fixtures"></div>');

Add location hack to node.js test runtime
Add location hack to node.js test runtime
