Wait for execute promise to prevent leaking subscriptions

This commit is contained in:
Kevin Sawicki 2013-04-27 07:58:56 -07:00
parent 53dde09523
commit b4cbffd978

View File

@ -554,4 +554,7 @@ describe "CommandPanel", ->
rootView.open('binary-file.png')
rootView.trigger 'command-panel:toggle'
expect(-> commandPanel.execute('Xx/sort/')).not.toThrow()
executePromise = null
expect(-> executePromise = commandPanel.execute('Xx/sort/')).not.toThrow()
waitsForPromise -> executePromise