diff --git a/src/packages/command-panel/spec/command-panel-spec.coffee b/src/packages/command-panel/spec/command-panel-spec.coffee index 2ed92cc41..8114d0aef 100644 --- a/src/packages/command-panel/spec/command-panel-spec.coffee +++ b/src/packages/command-panel/spec/command-panel-spec.coffee @@ -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