11import galaxyOptions from "@tests/test-data/bootstrapped" ;
22import { getGalaxyInstance , setGalaxyInstance } from "app" ;
3- import Backbone from "backbone" ;
43import { suppressDebugConsole } from "tests/jest/helpers" ;
54
65export function setupTestGalaxy ( galaxyOptions_ = null ) {
76 galaxyOptions_ = galaxyOptions_ || galaxyOptions ;
8- setGalaxyInstance ( ( GalaxyApp ) => {
9- const galaxy = new GalaxyApp ( galaxyOptions_ ) ;
10- galaxy . currHistoryPanel = {
11- model : new Backbone . Model ( ) ,
12- } ;
13- return galaxy ;
14- } ) ;
7+ setGalaxyInstance ( ( GalaxyApp ) => new GalaxyApp ( galaxyOptions_ ) ) ;
158}
169
1710// the app console debugs make sense but we just don't want to see them in test
@@ -38,13 +31,6 @@ describe("App base construction/initializiation defaults", () => {
3831 expect ( app . options . patchExisting ) . toBe ( true ) ;
3932 } ) ;
4033
41- test ( "App base extends from Backbone.Events" , function ( ) {
42- const app = getGalaxyInstance ( ) ;
43- [ "on" , "off" , "trigger" , "listenTo" , "stopListening" ] . forEach ( function ( fn ) {
44- expect ( Object . prototype . hasOwnProperty . call ( app , fn ) && typeof app [ fn ] === "function" ) . toBeTruthy ( ) ;
45- } ) ;
46- } ) ;
47-
4834 // // We no longer want this behavior, but leaving the test to express that
4935 test ( "App base will patch in attributes from existing Galaxy objects" , function ( ) {
5036 const existingApp = getGalaxyInstance ( ) ;
0 commit comments