Skip to content

[Review] [NOCSL] Add url validation#3

Open
govambam wants to merge 1 commit intobase-for-pr-419from
review-pr-419
Open

[Review] [NOCSL] Add url validation#3
govambam wants to merge 1 commit intobase-for-pr-419from
review-pr-419

Conversation

@govambam
Copy link
Owner

Recreated from Constructor-io#419 for Macroscope review.

Original PR: Constructor-io#419 by @stanlp1
Status: closed (merged)

Recreated using squash merge commit - exact merged state preserved.

Original PR: Constructor-io#419

* add tests

* add url validation

* try catch

* remove console log

* more tests

* minor test fix
@macroscopeapp
Copy link

macroscopeapp bot commented Feb 11, 2026

Add URL validation by updating utils.getCanonicalUrl to return an absolute URL and adjust tracker tests to expect canonical_url equal to 'https://localhost/'

Rewrite utils.getCanonicalUrl in helpers.js to resolve hrefs against document.location and return null when absent; add tests for canonical resolution in helpers.js; update tracker tests to compare canonical_url to a canonicalUrl constant.

📍Where to Start

Start with getCanonicalUrl in helpers.js, then review the new tests in helpers.js and the tracker expectations in tracker.js.


Macroscope summarized 54d30d4.

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