mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-12-28 00:52:29 +03:00
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.
This commit is contained in:
parent
c69e217192
commit
5b3755a170
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user