diff --git a/client/src/app/app.test.js b/client/src/app/app.test.js index a4316426c57..e7b8d747046 100644 --- a/client/src/app/app.test.js +++ b/client/src/app/app.test.js @@ -1,9 +1,6 @@ import { getGalaxyInstance, setGalaxyInstance } from "app"; -import sinon from "sinon"; import Backbone from "backbone"; -import { getAppRoot } from "onload"; import galaxyOptions from "@tests/qunit/test-data/bootstrapped"; -import serverdata from "@tests/qunit/test-data/fakeserver"; export function setupTestGalaxy(galaxyOptions_ = null) { galaxyOptions_ = galaxyOptions_ || galaxyOptions; @@ -19,22 +16,6 @@ export function setupTestGalaxy(galaxyOptions_ = null) { describe("App base construction/initializiation defaults", () => { beforeEach(() => { setupTestGalaxy(galaxyOptions); - window.WAIT_FADE = 300; - window.fakeserver = sinon.fakeServer.create(); - for (const route in serverdata) { - window.fakeserver.respondWith("GET", getAppRoot() + route, [ - 200, - { "Content-Type": "application/json" }, - serverdata[route].data, - ]); - } - }); - - afterEach(() => { - if (window.fakeserver) { - window.fakeserver.restore(); - delete window.fakeserver; - } }); test("App base construction/initializiation defaults", function () { @@ -55,7 +36,7 @@ describe("App base construction/initializiation defaults", () => { test("App base extends from Backbone.Events", function () { const app = getGalaxyInstance(); ["on", "off", "trigger", "listenTo", "stopListening"].forEach(function (fn) { - expect(app.fn && typeof app[fn] === "function").toBeTruthy(); + expect(Object.prototype.hasOwnProperty.call(app, fn) && typeof app[fn] === "function").toBeTruthy(); }); }); diff --git a/client/src/app/galaxy.js b/client/src/app/galaxy.js index 49ca605333b..e84180f6de5 100644 --- a/client/src/app/galaxy.js +++ b/client/src/app/galaxy.js @@ -38,18 +38,11 @@ GalaxyApp.prototype._init = function (options, bootstrapped) { this.params = options.params || {}; this.session_csrf_token = options.session_csrf_token || null; - // at this point, either logging or not and namespaces are enabled - chat it up - console.debug("GalaxyApp.options: ", this.options); - console.debug("GalaxyApp.config: ", this.config); - this._initLocale(); - console.debug("GalaxyApp.localize: ", this.localize); this.config = options.config || {}; - console.debug("GalaxyApp.config: ", this.config); this._initUser(options.user || {}); - console.debug("GalaxyApp.user: ", this.user); _setUserLocale(this.user, this.config); _getUserLocale(); @@ -113,8 +106,7 @@ GalaxyApp.prototype._patchGalaxy = function _patchGalaxy(patchWith) { }; /** add the localize fn to this object and the window namespace (as '_l') */ -GalaxyApp.prototype._initLocale = function _initLocale(options) { - console.debug("_initLocale:", options); +GalaxyApp.prototype._initLocale = function _initLocale() { this.localize = localize; // add to window as global shortened alias // TODO: temporary - remove when can require for plugins diff --git a/client/src/app/user-model.js b/client/src/app/user-model.js index 27d5c6ce948..f4d6de32684 100644 --- a/client/src/app/user-model.js +++ b/client/src/app/user-model.js @@ -32,8 +32,6 @@ var User = Backbone.Model.extend( * @param {Object} data Initial model data. */ initialize: function (data) { - console.log("User.initialize:", data); - this.on("loaded", function (model, resp) { console.log(`${this} has loaded:`, model, resp); });