-
-
Notifications
You must be signed in to change notification settings - Fork 34.2k
Description
I'm in the process of trying to collect coverage for Node.js' own internal libraries, and am running into a few significant problems:
-
line counts appear to be all over the place; also we don't collect coverage for the wrap itself on several internal modules. Here's output from
assert.jsas an example.- with coverage: make coverage work for Node.js #23941, we are now collecting coverage for the top level of internal modules.
- it's still somewhat difficult to figure out the initial offset of files, this is being worked on in (lib: modify NativeModule to use compileFunction #23837, and module: use compileFunction over Module.wrap #21573).
-
coverage can't currently be collected or functions with return statementscoverage isn't collected for closing braces in if statements, see: https://bugs.chromium.org/p/v8/issues/detail?id=8381 (@hashseed, @schuay).- coverage isn't collected for throw statement.
-
the performance of merging 2800 reports is atrocious, I think this is partially because files like
loader.jsneed to get merged over and over again, and also have many 1000s of blocks.- @demurgos' work has significantly improved merging performance.
-
I'm seeing a few failures for tests that instrument code used by coverage itself; specifically tests that mock the
eventsmodule.
would love some help getting unblocked from these two issues, very excited to move our own test suite towards built in coverage.
CC: @addaleax, @demurgos, @hashseed, @TimothyGu, @schuay
- Version:
>v10.10.0 - Platform :
all platforms - Subsystem:
test