Fix no-param-reassign in tests
[MAILPOET-1033]
This commit is contained in:
@ -55,20 +55,21 @@ jQuery.fn.stick_in_parent = function() { return this; };
|
||||
// Add global stubs for convenience
|
||||
// TODO: Extract those to a separate file
|
||||
global.stubChannel = function (EditorApplication, returnObject) {
|
||||
EditorApplication.getChannel = sinon.stub().returns(_.defaults(returnObject || {}, {
|
||||
var App = EditorApplication;
|
||||
App.getChannel = sinon.stub().returns(_.defaults(returnObject || {}, {
|
||||
trigger: function () {
|
||||
},
|
||||
on: function () {
|
||||
}
|
||||
}));
|
||||
};
|
||||
global.stubConfig = function (EditorApplication, config) {
|
||||
config = config || {};
|
||||
EditorApplication.getConfig = sinon.stub().returns(new Backbone.SuperModel(config));
|
||||
global.stubConfig = function (EditorApplication, opts) {
|
||||
var App = EditorApplication;
|
||||
App.getConfig = sinon.stub().returns(new Backbone.SuperModel(opts || {}));
|
||||
};
|
||||
global.stubAvailableStyles = function (EditorApplication, styles) {
|
||||
styles = styles || {};
|
||||
EditorApplication.getAvailableStyles = sinon.stub().returns(new Backbone.SuperModel(styles));
|
||||
var App = EditorApplication;
|
||||
App.getAvailableStyles = sinon.stub().returns(new Backbone.SuperModel(styles || {}));
|
||||
};
|
||||
|
||||
global.stubImage = function(defaultWidth, defaultHeight) {
|
||||
|
Reference in New Issue
Block a user