(function () { 'use strict'; var ID = 'view/sidebar'; var DEPS = ['$', 'core/resource', 'core/store']; describe('module "' + ID + '"', function () { before(function () { this.definition = modulejs._private.definitions[ID]; this.xResource = { image: sinon.stub().throws('invalid image request') }; this.xResource.image.withArgs('back').returns(util.uniqPath('-back.png')); this.xResource.image.withArgs('sidebar').returns(util.uniqPath('-sidebar.png')); this.xStore = { get: sinon.stub().returns(false), put: sinon.stub() }; this.xStore.get.returns(false); this.applyFn = function () { this.xResource.image.reset(); this.xStore.get.reset(); this.xStore.put.reset(); return this.definition.fn($, this.xResource, this.xStore); }; }); after(function () { util.restoreHtml(); }); beforeEach(function () { util.restoreHtml(); $('
').appendTo('body'); $('