Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently jasmine-npm does not remove the exit listener it adds when it executes. This pull moves the exit listener code completely within the completion reporter so that the listener can be added and removed whenever jasmine is started and done. This is basically pull #125 , except that the jasmine interface remains as intact as possible. The only interface change is that the completion reporter now uses jasmineStarted to add the exit listener. The jasmineStarted method can no longer be overwritten without losing the exit check logic. You can close issue #134 after merging. The fix should allow jasmine to be used with things like gulp watch without errors about max listeners.
Unfortunatly I also had to make failing tests pass on Windows since file logic relied on path separators only being / when windows also allows \. The fix will probably make it so that on windows, files aren't required twice. I don't actually think requiring a file twice does any harm, especially with how it is used here.
Unrelated, but I found it ironic that the tests were smart enough to remove the exit listener while the actual code it was testing was not.