Skip to content

fix(selectivity): dont rely on source maps originalPositionFor mappings#1283

Merged
KuznetsovRoman merged 2 commits into
masterfrom
TESTPLANE-1046.selectivity_alg
Jun 26, 2026
Merged

fix(selectivity): dont rely on source maps originalPositionFor mappings#1283
KuznetsovRoman merged 2 commits into
masterfrom
TESTPLANE-1046.selectivity_alg

Conversation

@KuznetsovRoman

Copy link
Copy Markdown
Member

No description provided.

@pkg-pr-new

pkg-pr-new Bot commented Jun 23, 2026

Copy link
Copy Markdown

Open in StackBlitz

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

commit: 3a0da09

@github-actions

github-actions Bot commented Jun 23, 2026

Copy link
Copy Markdown

✅ Testplane E2E run succeed

Report

@github-actions

github-actions Bot commented Jun 23, 2026

Copy link
Copy Markdown

✅ Testplane browser-env run succeed

Report

}

const dependingSourceFiles = extractSourceFilesDeps(
const parsedSourceMapRanges = await parseSourceMapRanges(

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Besides CDP coverage, we only need ranges "from which source file each part of generated file is derived"

*/
const offsetToSourceMapLineNumber = (offsetToLine: number[], offset: number): number => {
let lineNumber = sortedIndex(offsetToLine, offset);
const getSourceLineOffsetArray = (source: string): number[] => {

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

In result array, arr[i] is "offset to i line"

let jsonCachedResult: ParsedSourceMapRanges | null = null;

try {
const cachedResult = await getCachedSelectivityFile(CacheType.SourceMapParseResult, sourceMaps);

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Since bundle files can present in multiple tests, caching makes sence

@KuznetsovRoman KuznetsovRoman force-pushed the TESTPLANE-1046.selectivity_alg branch from f49d4cc to 64851e9 Compare June 25, 2026 11:47
@KuznetsovRoman KuznetsovRoman force-pushed the TESTPLANE-1046.selectivity_alg branch from 64851e9 to 3a0da09 Compare June 26, 2026 01:46
@KuznetsovRoman KuznetsovRoman merged commit 4aa4966 into master Jun 26, 2026
9 checks passed
@KuznetsovRoman KuznetsovRoman deleted the TESTPLANE-1046.selectivity_alg branch June 26, 2026 15:18
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