mirror of
https://github.com/atom/atom.git
synced 2026-01-23 13:58:08 -05:00
Trigger polling in spec via window resize instead of advancing clock
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
ViewRegistry = require '../src/view-registry'
|
||||
{View} = require '../src/space-pen-extensions'
|
||||
|
||||
describe "ViewRegistry", ->
|
||||
fdescribe "ViewRegistry", ->
|
||||
registry = null
|
||||
|
||||
beforeEach ->
|
||||
@@ -161,13 +161,13 @@ describe "ViewRegistry", ->
|
||||
registry.updateDocument -> events.push('write')
|
||||
registry.readDocument -> events.push('read')
|
||||
|
||||
advanceClock(registry.documentPollingInterval)
|
||||
window.dispatchEvent(new UIEvent('resize'))
|
||||
expect(events).toEqual []
|
||||
|
||||
frameRequests[0]()
|
||||
expect(events).toEqual ['write', 'read', 'poll']
|
||||
|
||||
advanceClock(registry.documentPollingInterval)
|
||||
window.dispatchEvent(new UIEvent('resize'))
|
||||
expect(events).toEqual ['write', 'read', 'poll', 'poll']
|
||||
|
||||
it "polls the document after updating when ::pollAfterNextUpdate() has been called", ->
|
||||
|
||||
Reference in New Issue
Block a user