diff --git a/lib/mock-ajax.js b/lib/mock-ajax.js index 1af075e..0e474cb 100644 --- a/lib/mock-ajax.js +++ b/lib/mock-ajax.js @@ -1,6 +1,6 @@ /* -Jasmine-Ajax - v3.2.0: a set of helpers for testing AJAX requests under the Jasmine +Jasmine-Ajax - v3.3.0: a set of helpers for testing AJAX requests under the Jasmine BDD framework for JavaScript. http://github.com/jasmine/jasmine-ajax @@ -32,19 +32,19 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. //Module wrapper to support both browser and CommonJS environment (function (root, factory) { - if (typeof exports === 'object' && typeof exports.nodeName !== 'string') { - // CommonJS - var jasmineRequire = require('jasmine-core'); - module.exports = factory(root, function() { - return jasmineRequire; - }); - } else { + // if (typeof exports === 'object' && typeof exports.nodeName !== 'string') { + // // CommonJS + // var jasmineRequire = require('jasmine-core'); + // module.exports = factory(root, function() { + // return jasmineRequire; + // }); + // } else { // Browser globals window.MockAjax = factory(root, getJasmineRequireObj); - } + // } }(typeof window !== 'undefined' ? window : global, function (global, getJasmineRequireObj) { -// +// getJasmineRequireObj().ajax = function(jRequire) { var $ajax = {}; @@ -284,7 +284,7 @@ getJasmineRequireObj().AjaxFakeRequest = function(eventBusFactory) { return null; } - extend(FakeXMLHttpRequest, { +extend(FakeXMLHttpRequest, { UNSENT: 0, OPENED: 1, HEADERS_RECEIVED: 2, diff --git a/src/boot.js b/src/boot.js index e755e22..72a4024 100644 --- a/src/boot.js +++ b/src/boot.js @@ -32,16 +32,16 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. //Module wrapper to support both browser and CommonJS environment (function (root, factory) { - if (typeof exports === 'object' && typeof exports.nodeName !== 'string') { - // CommonJS - var jasmineRequire = require('jasmine-core'); - module.exports = factory(root, function() { - return jasmineRequire; - }); - } else { + // if (typeof exports === 'object' && typeof exports.nodeName !== 'string') { + // // CommonJS + // var jasmineRequire = require('jasmine-core'); + // module.exports = factory(root, function() { + // return jasmineRequire; + // }); + // } else { // Browser globals window.MockAjax = factory(root, getJasmineRequireObj); - } + // } }(typeof window !== 'undefined' ? window : global, function (global, getJasmineRequireObj) { // <% files.forEach(function(filename) { %>