Skip to content

Commit 44fdef5

Browse files
authored
fix: enable and disable debugger for more accurate coverage (#235)
1 parent 695c48d commit 44fdef5

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

index.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ class CoverageInstrumenter {
1313
async startInstrumenting() {
1414
this.session.connect();
1515

16+
await this.postSession('Debugger.enable');
17+
1618
await this.postSession('Profiler.enable');
1719

1820
await this.postSession('Profiler.startPreciseCoverage', {
@@ -30,6 +32,8 @@ class CoverageInstrumenter {
3032

3133
await this.postSession('Profiler.disable');
3234

35+
await this.postSession('Debugger.disable');
36+
3337
// When using networked filesystems on Windows, v8 sometimes returns URLs
3438
// of the form file:////<host>/path. These URLs are not well understood
3539
// by NodeJS (see https://github.com/nodejs/node/issues/48530).

0 commit comments

Comments
 (0)