(function () { 'use strict'; var ID = 'view/viewmode'; var DEPS = ['_', '$', 'core/resource', 'core/settings', 'core/store', 'view/content', 'view/sidebar']; describe('module \'' + ID + '\'', function () { before(function () { this.definition = modulejs._private.definitions[ID]; this.xSettings = { view: {} }; this.xResource = { image: sinon.stub().returns(util.uniqPath('-image.png')) }; this.xStore = { get: sinon.stub(), put: sinon.stub() }; this.xContent = {$view: null}; this.xSidebar = {$el: null}; this.applyFn = function () { this.xResource.image.reset(); this.xStore.get.reset(); this.xStore.put.reset(); return this.definition.fn(_, $, this.xResource, this.xSettings, this.xStore, this.xContent, this.xSidebar); }; }); after(function () { util.restoreHtml(); }); beforeEach(function () { util.restoreHtml(); this.xContent.$view = $('
').appendTo('body'); this.xSidebar.$el = $('