wix-incubator / jest-metadata

πŸ¦Έβ€β™‚οΈ Superhero power for your Jest reporters! πŸ¦Έβ€β™€οΈ

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cannot subscribe to multiple events with a single listener

noomorph opened this issue Β· comments

ReadonlyEmitterBase has #rememberListener logic, and looks like it is flawed.

You cannot do emitter.on('event1', fn).on('event2', fn) – only the last subscription will work.

UPD: the problem was absolutely in another place. The external subscribers of the event emitter get "current metadata" of a closed entity.

TODO: The PR #23 is not final. I might approach this problem differently: do not reset the current metadata on end/finish event.

πŸŽ‰ This issue has been resolved in version 1.0.0 πŸŽ‰

The release is available on:

Your semantic-release bot πŸ“¦πŸš€