You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently we're able to get code coverage for all tests running in an extension.
However when testing the debug adapter, we're not able to get any coverage as the the adapter launches a seprate process (child_process.spawn).
The solution to get coverate would be to change the values passed into spawn as follows:
runtime = npx or istanbul
executable (turned into an array) = ['cover', '<adapter.js>', '--dir', './coverage'] (basically we're passing an array instead of a string for executable
We now have code coverage.
So, the way I see it, the only change would be to turn the argument executable into a string|string[].
Possibly having to either rename the argument or creating an overloaded constructor.
The text was updated successfully, but these errors were encountered:
DonJayamanne
changed the title
Support code coverage when testing debuggers
Pass multiple arguments to the test DebugClient to enable code coverage
Feb 14, 2018
Closing as this doesn't work, as output from istanbul in stdout/stderr will interfere with debugger.
Will need to use the other connection mechanism (using the socket)
Currently we're able to get code coverage for all tests running in an extension.
However when testing the debug adapter, we're not able to get any coverage as the the adapter launches a seprate process (child_process.spawn).
The solution to get coverate would be to change the values passed into spawn as follows:
npx
oristanbul
['cover', '<adapter.js>', '--dir', './coverage']
(basically we're passing an array instead of a string for executableWe now have code coverage.
So, the way I see it, the only change would be to turn the argument executable into a
string|string[]
.Possibly having to either rename the argument or creating an overloaded constructor.
The text was updated successfully, but these errors were encountered: