Fix errors in benchmarks
One notable change is that if the editor has a display update pending, we wait until it completes before moving on to the next benchmark.
Esse commit está contido em:
@@ -10,7 +10,7 @@ require 'window'
|
||||
requireStylesheet "jasmine.css"
|
||||
|
||||
# Load TextMate bundles, which specs rely on (but not other packages)
|
||||
atom.loadPackages(atom.getAvailableTextMateBundles())
|
||||
atom.loadTextMatePackages()
|
||||
|
||||
beforeEach ->
|
||||
# reset config after each benchmark; don't load or save from/to `config.json`
|
||||
|
||||
@@ -17,9 +17,15 @@ describe "editor.", ->
|
||||
editor = rootView.getActiveEditor()
|
||||
|
||||
afterEach ->
|
||||
$(window).off 'beforeunload'
|
||||
window.shutdown()
|
||||
atom.setRootViewStateForPath(rootView.project.getPath(), null)
|
||||
if editor.pendingDisplayUpdate
|
||||
waitsFor "editor to finish rendering", (done) ->
|
||||
editor.on 'editor:display-updated', done
|
||||
|
||||
runs ->
|
||||
projectPath = rootView.project.getPath()
|
||||
$(window).off 'beforeunload'
|
||||
window.shutdown()
|
||||
atom.setRootViewStateForPath(projectPath, null)
|
||||
|
||||
describe "keymap.", ->
|
||||
event = null
|
||||
|
||||
@@ -882,6 +882,7 @@ class Editor extends View
|
||||
@updateCursorViews()
|
||||
@updateSelectionViews()
|
||||
@autoscroll(options)
|
||||
@trigger 'editor:display-updated'
|
||||
|
||||
updateCursorViews: ->
|
||||
if @newCursors.length > 0
|
||||
|
||||
Referência em uma Nova Issue
Bloquear um usuário