Skip to content

Fix bug in URL setter test harness, and modernize - #51369

Merged
domenic merged 1 commit into
masterfrom
fix-setter-test-bug
Mar 15, 2025
Merged

domenic merged 1 commit into
masterfrom
fix-setter-test-bug

Conversation

@domenic

@domenic domenic commented Mar 15, 2025 •

Copy link
Copy Markdown
Member

Because we were using var instead of let, the closure was capturing only the last value for test_case. So we were only ever running one of the setter test cases (repeatedly) per property.

A minor fix would be to move from var to let. But, instead I just modernized these files completely.

(Found as part of jsdom/whatwg-url#268.)

Because we were using var instead of let, the closure was capturing only the last value for test_case. So we were only ever running one of the setter test cases (repeatedly) per property.

A minor fix would be to move from var to let. But, instead I just modernized these files completely.

@annevk annevk left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nice, looks like the results are identical (in Safari, anyway).

@domenic
domenic merged commit 072413f into master Mar 15, 2025
@domenic
domenic deleted the fix-setter-test-bug branch March 15, 2025 06:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants