jquery/test/promises_aplus_adapter.js
Michał Gołębiowski 04ec688e80 Core: Support non-browser environments
Fixes gh-2133
Fixes gh-2501
Closes gh-2504
Refs gh-1950
Refs gh-1949
Refs gh-2397
Refs gh-1537
Refs gh-2504
Refs 842958e7ae
2015-08-16 22:29:42 +02:00

23 lines
417 B
JavaScript

/* jshint node: true */
"use strict";
require( "jsdom" ).env( "", function ( errors, window ) {
if ( errors ) {
console.error( errors );
return;
}
var jQuery = require( ".." )( window );
exports.deferred = function () {
var deferred = jQuery.Deferred();
return {
promise: deferred.promise(),
resolve: deferred.resolve.bind( deferred ),
reject: deferred.reject.bind( deferred )
};
};
} );