var jsdom = require('mocha-jsdom')
var rerequire = jsdom.rerequire
jsdom()
$ = rerequire('jquery')

// -----------------------------------
/**
 * 取出HTML
 */
get_outer_html = function (_ele) {
    var _container = $("<div></div>");
    
    if (_ele.length === 1 && typeof(_ele[0].html) !== "function") {
        _ele = _ele[0];
    }
    if (typeof(_ele.length) === "undefined") {
        _ele = [_ele];
    }
    
    //console.log(_ele.length);
    
    for (var _i = 0; _i < _ele.length; _i++) {
        var _e;
        if (typeof(_ele.eq) === "function") {
            _e = _ele.eq(_i);
        }
        else {
            _e = _ele[_i];
        }
        
        _container.append(_e);
    }
    
    var _output = _container.html();
    _output = _output.split("\n").join("");
    return _output;
};

@@ -1,96 +1,139 @@
-var jsdom = require('mocha-jsdom')%0D%0Avar rerequire = jsdom.rerequire%0D%0Ajsdom()%0D%0A
+require(%22jsdom%22).env(%22%22, function(err, window) %7B%0D%0A    if (err) %7B%0D%0A        console.error(err);%0D%0A        return;%0D%0A    %7D%0D%0A    
 $ = 
-re
 require(
 'jqu
@@ -132,17 +132,33 @@
 ire(
-'
+%22
 jquery
-')
+%22)(window);%0D%0A%7D);%0D%0A
 %0D%0A%0D%0A

Update jquery.js