jsdoc3/jsdoc — pull request #421 by ErnstHaagsman (2013-05-10 10:44:51+00:00)
Title: Plugins: Created processingComplete event

Having an event fire after all processing (including augments and borrows) has completed, with the entire docs variable. This is useful in my case because I would like to refactor the functionality of #417 into a plugin. I could imagine that other plugins could also use this to do final processing on the documentation. Getting the docs variable also seems more useful than just a list of files (as received from parseComplete).

I'm not entirely sure how to write unit tests for this event though. This seems useless:

```javascript

it("should fire processingComplete", function(){
var spy = jasmine.createSpy();
parser.on('processingComplete', spy).fireProcessingComplete({});
expect(spy).toHaveBeenCalled();
expect(spy.mostRecentCall.args[0]).toEqual({});
});
```

However, calling the main method of jsdoc from a unit test doesn't sound like the smartest idea either.