(function () { 'use strict'; var ID = 'view/viewmode'; var DEPS = ['_', '$', 'core/resource', 'core/settings', 'core/store', 'view/sidebar', 'view/view']; describe('module \'' + ID + '\'', function () { before(function () { this.definition = modulejs._private.definitions[ID]; this.xResource = { image: sinon.stub().returns(util.uniqPath('-image.png')) }; this.xSettings = {view: { modes: ['details', 'grid', 'icons'], sizes: [20, 40, 60, 80, 100] }}; this.xStore = { get: sinon.stub(), put: sinon.stub() }; this.xSidebar = {$el: null}; this.xView = {$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.xSidebar, this.xView); }; }); after(function () { util.restoreHtml(); }); beforeEach(function () { util.restoreHtml(); this.xSidebar.$el = $('