Closed marcbachmann closed 5 years ago
I think we could potentially add more examples to the README and showcase some of the usages from the tests for sure. We could also highlight that you can use all methods of EventEmitter on the tracker. However exhaustively documenting everything you can do with the tracker as EventEmitter might be outside of scope IMO.
Although now that I think of it I'm not sure myself if there was any purposeful intent on not documenting that @jbrumwell?
I agree I don't think we need to document every usage but definitely mentioning that tracker inherits from event emitter would be beneficial. @marcbachmann yes there are no plans to move away from extending event emitter so feel free to use it :)
A tracker extends an EventEmitter class but that api is not documented. In your tests you're also using
tracker.once('query', cb)
, so is that the official api? e.g. https://github.com/colonyamerican/mock-knex/blob/master/test/common/tracker.js#L49I'd like to use it.