gotwarlost / istanbul

Yet another JS code coverage tool that computes statement, line, function and branch coverage with module loader hooks to transparently add coverage when running tests. Supports all JS coverage use cases including unit tests, server side functional tests and browser tests. Built for scale.
Other
8.7k stars 787 forks source link

implementation question #719

Open ORESoftware opened 7 years ago

ORESoftware commented 7 years ago

Just curious, when an Istanbul process exits prematurely (uncaughtException, etc), does Istanbul still collect as much coverage information as possible no matter what? Or does it only write out the info if the process exits with code 0?

ORESoftware commented 7 years ago

this seems pertinent, because my exit code handler is not being hit, and I believe it's because istanbul's exit handler is synchronously exiting before mine gets invoked?

see this screenshot:

screenshot 2016-11-07 21 28 42