-
Notifications
You must be signed in to change notification settings - Fork 7.6k
fix module loading for SpecRunnerUtils #1250
Conversation
Hmm, I thought this was working but Raymond reported it failed. Investigating. |
@jason-sanjose: it still repros for me too, fwiw |
Forced jasmine init to happen after extension loading. The bug where the window remains open was due to the |
Question: do we still need all the |
For consistency, yes, we need that |
@@ -153,10 +158,9 @@ define(function (require, exports, module) { | |||
paths: config.paths | |||
}; | |||
return processExtension(item, extConfig, entryPoint); | |||
}).done(function () { | |||
}).always(function () { | |||
// Always resolve the promise even when the extension entry point is missing | |||
result.resolve(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bear in mind that the fail() case for extension loading is never invoked: if an extension doesn't exist or crashes during init, we just never get a response instead. So even though this is now attached to always()
, the result will still never resolve if there's any sort of error. (I don't think this has any effect on the rest of your patch, but just thought I should point it out for clarity).
For details see here: #954 (comment)
The SpecRunner.js init() stuff looks much cleaner right now -- nice! |
Ok, looks good! I can confirm it fixes adobe/brackets-shell#33 for me too. Merging now... |
fix module loading for SpecRunnerUtils - ensures unit tests that open a new window actually runs instead of silently getting ignored (in brackets-shell)
The first testWindow didn't close because multiple instances of the
SpecRunnerUtils
module were loaded. Fixes adobe/brackets-shell#33.