environment.js (lodash-4.0.0) | : | environment.js (lodash-4.17.21) | ||
---|---|---|---|---|
(function() { | (function(QUnit) { | |||
var sync = Backbone.sync; | var sync = Backbone.sync; | |||
var ajax = Backbone.ajax; | var ajax = Backbone.ajax; | |||
var emulateHTTP = Backbone.emulateHTTP; | var emulateHTTP = Backbone.emulateHTTP; | |||
var emulateJSON = Backbone.emulateJSON; | var emulateJSON = Backbone.emulateJSON; | |||
var history = window.history; | var history = window.history; | |||
var pushState = history.pushState; | var pushState = history.pushState; | |||
var replaceState = history.replaceState; | var replaceState = history.replaceState; | |||
QUnit.config.noglobals = true; | QUnit.config.noglobals = true; | |||
QUnit.testStart(function() { | QUnit.testStart(function() { | |||
var env = QUnit.config.current.testEnvironment; | var env = QUnit.config.current.testEnvironment; | |||
// We never want to actually call these during tests. | // We never want to actually call these during tests. | |||
history.pushState = history.replaceState = function(){}; | history.pushState = history.replaceState = function() {}; | |||
// Capture ajax settings for comparison. | // Capture ajax settings for comparison. | |||
Backbone.ajax = function(settings) { | Backbone.ajax = function(settings) { | |||
env.ajaxSettings = settings; | env.ajaxSettings = settings; | |||
}; | }; | |||
// Capture the arguments to Backbone.sync for comparison. | // Capture the arguments to Backbone.sync for comparison. | |||
Backbone.sync = function(method, model, options) { | Backbone.sync = function(method, model, options) { | |||
env.syncArgs = { | env.syncArgs = { | |||
method: method, | method: method, | |||
skipping to change at line 45 | skipping to change at line 45 | |||
QUnit.testDone(function() { | QUnit.testDone(function() { | |||
Backbone.sync = sync; | Backbone.sync = sync; | |||
Backbone.ajax = ajax; | Backbone.ajax = ajax; | |||
Backbone.emulateHTTP = emulateHTTP; | Backbone.emulateHTTP = emulateHTTP; | |||
Backbone.emulateJSON = emulateJSON; | Backbone.emulateJSON = emulateJSON; | |||
history.pushState = pushState; | history.pushState = pushState; | |||
history.replaceState = replaceState; | history.replaceState = replaceState; | |||
}); | }); | |||
})(); | })(QUnit); | |||
End of changes. 3 change blocks. | ||||
2 lines changed or deleted | 2 lines changed or added |