Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pass multiple arguments to the test DebugClient to enable code coverage #156

Closed
DonJayamanne opened this issue Feb 14, 2018 · 2 comments
Closed
Assignees
Labels
feature-request Request for new features or functionality

Comments

@DonJayamanne
Copy link

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.

@DonJayamanne DonJayamanne changed the title Support code coverage when testing debuggers Pass multiple arguments to the test DebugClient to enable code coverage Feb 14, 2018
@weinand weinand self-assigned this Feb 15, 2018
@weinand weinand added the feature-request Request for new features or functionality label Feb 15, 2018
@DonJayamanne
Copy link
Author

I'm assuming the new proposed api DebugConfigurationProvider.debugAdapterExecutable in VS Code will make this possible.

@DonJayamanne
Copy link
Author

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Request for new features or functionality
Projects
None yet
Development

No branches or pull requests

2 participants