Skip to content

fix(selectivity): dont belive in Profiler.takePreciseCoverage result#1208

Merged
KuznetsovRoman merged 2 commits intomasterfrom
TESTPLANE-902.preciseCoverageUrl
Feb 17, 2026
Merged

fix(selectivity): dont belive in Profiler.takePreciseCoverage result#1208
KuznetsovRoman merged 2 commits intomasterfrom
TESTPLANE-902.preciseCoverageUrl

Conversation

@KuznetsovRoman
Copy link
Member

No description provided.

await Promise.all(
scriptIds.map(async scriptId => {
// Every "scriptId" has only one uniq "url"
const url = grouppedByScriptCoverage[scriptId][0].url;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can be missing because of browser bug, so we don't rely on it anymore

@pkg-pr-new
Copy link

pkg-pr-new bot commented Feb 16, 2026

Open in StackBlitz

npm i https://pkg.pr.new/gemini-testing/testplane@1208

commit: 4055140

Comment on lines +33 to +35
if (!key) {
throw new Error("Attepted to check existance of cache with empty key");
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is not supposed to happen anyway, but with this error message we can be sure any other errors, if occur, are not because of cache read/write for empty key

]);
const sourceMapUrl = this._scriptIdToSourceMapUrl[scriptId];
// Every "scriptId" has only one uniq "url"
const sourceUrl = this._scriptIdToSourceUrl[scriptId] || grouppedByScriptCoverage[scriptId][0].url;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now we acknowledge "takePreciseCoverage" might return empty url, so we prefer getting url from "this._scriptIdToSourceUrl" - where its written by "Debugger.scriptParsed" events

@KuznetsovRoman KuznetsovRoman merged commit 474d074 into master Feb 17, 2026
7 checks passed
@KuznetsovRoman KuznetsovRoman deleted the TESTPLANE-902.preciseCoverageUrl branch February 17, 2026 13:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments