Skip to content

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

Open
KuznetsovRoman wants to merge 2 commits into
masterfrom
TESTPLANE-1046.selectivity_alg
Open

fix(selectivity): dont rely on source maps originalPositionFor mappings#1283
KuznetsovRoman wants to merge 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: f49d4cc

@github-actions

Copy link
Copy Markdown

✅ Testplane E2E run succeed

Report

@github-actions

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

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.

1 participant