From a922e831b1e8c1500b3b97162dd912aec7719b7e Mon Sep 17 00:00:00 2001 From: cenfun Date: Tue, 19 Mar 2024 23:06:51 +0800 Subject: [PATCH 1/2] fix issue jest 14766 --- index.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/index.js b/index.js index 08b7853..cb748e5 100644 --- a/index.js +++ b/index.js @@ -13,6 +13,8 @@ class CoverageInstrumenter { async startInstrumenting() { this.session.connect(); + await this.postSession('Debugger.enable'); + await this.postSession('Profiler.enable'); await this.postSession('Profiler.startPreciseCoverage', { From c36c3e570a243f9275ebef45989b26555a67cf82 Mon Sep 17 00:00:00 2001 From: cenfun Date: Wed, 20 Mar 2024 08:46:53 +0800 Subject: [PATCH 2/2] added Debugger.disable --- index.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/index.js b/index.js index cb748e5..db9ea66 100644 --- a/index.js +++ b/index.js @@ -32,6 +32,8 @@ class CoverageInstrumenter { await this.postSession('Profiler.disable'); + await this.postSession('Debugger.disable'); + // When using networked filesystems on Windows, v8 sometimes returns URLs // of the form file://///path. These URLs are not well understood // by NodeJS (see https://github.com/nodejs/node/issues/48530).