Skip to content

fix(selectivity): anonymous styles#1276

Merged
KuznetsovRoman merged 1 commit into
masterfrom
TESTPLANE-1040.anonymous_styles
Jun 11, 2026
Merged

fix(selectivity): anonymous styles#1276
KuznetsovRoman merged 1 commit into
masterfrom
TESTPLANE-1040.anonymous_styles

Conversation

@KuznetsovRoman

Copy link
Copy Markdown
Member

No description provided.

@pkg-pr-new

pkg-pr-new Bot commented Jun 10, 2026

Copy link
Copy Markdown

Open in StackBlitz

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

commit: a3eca39


let sourceMapResolvedUrl = urlResolve(sourceURL, sourceMapURL);

if (!URL.canParse(sourceMapResolvedUrl)) {

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.

Instead of checking "is there any base url" we see "if it resolved to valid url" (no source url + embedded sourcemap = valid)


if (this._scriptsSource[scriptId] && this._scriptsSourceMap[scriptId]) {
// Anonymous or processed
if (!url || (this._scriptsSource[scriptId] && this._scriptsSourceMap[scriptId])) {

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.

If script is anonymous, dont set "null" to scripts map so it would not be considered as "handled" and would be processed if needed, on "stop" call if this script explicitly was in the coverage

@KuznetsovRoman KuznetsovRoman force-pushed the TESTPLANE-1040.anonymous_styles branch from 8a866f2 to a3eca39 Compare June 11, 2026 10:55
@KuznetsovRoman KuznetsovRoman changed the title fix(selectivity): anonymous scripts/styles fix(selectivity): anonymous styles Jun 11, 2026
Comment thread package.json
"homepage": "https://testplane.io/",
"engines": {
"node": ">= 18.0.0"
"node": ">= 18.17.0"

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.

URL.canParse

@KuznetsovRoman KuznetsovRoman merged commit a5143d7 into master Jun 11, 2026
9 checks passed
@KuznetsovRoman KuznetsovRoman deleted the TESTPLANE-1040.anonymous_styles branch June 11, 2026 14:44
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