Don't set TextEditor class's schedule in AtomEnvironment constructor

We construct multiple AtomEnvironment instances in the tests. I don't
know how the tests ever worked with this code in there.
This commit is contained in:
Max Brunsfeld
2017-11-21 13:11:22 -08:00
parent 218eb57f3a
commit 93f5ab4780
3 changed files with 2 additions and 1 deletions

View File

@@ -71,7 +71,6 @@ class AtomEnvironment {
this.deserializers = new DeserializerManager(this)
this.deserializeTimings = {}
this.views = new ViewRegistry(this)
TextEditor.setScheduler(this.views)
this.notifications = new NotificationManager()
this.stateStore = new StateStore('AtomEnvironments', 1)

View File

@@ -67,6 +67,7 @@ global.atom = new AtomEnvironment({
enablePersistence: true
})
TextEditor.setScheduler(global.atom.views)
global.atom.preloadPackages()
# Like sands through the hourglass, so are the days of our lives.

View File

@@ -82,6 +82,7 @@ module.exports = ({blobStore}) ->
params.onlyLoadBaseStyleSheets = true unless params.hasOwnProperty("onlyLoadBaseStyleSheets")
atomEnvironment = new AtomEnvironment(params)
atomEnvironment.initialize(params)
TextEditor.setScheduler(atomEnvironment.views)
atomEnvironment
promise = testRunner({