Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update FoundationToWeb tests #184

Open
karwa opened this issue Feb 14, 2024 · 0 comments
Open

Update FoundationToWeb tests #184

karwa opened this issue Feb 14, 2024 · 0 comments

Comments

@karwa
Copy link
Owner

karwa commented Feb 14, 2024

FoundationToWeb tests are (intentionally) tightly coupled to the Foundation.URL implementation. For instance:

  1. It uses Foundation's test database of interesting input strings, which it then parses with Foundation.URL and checks the resulting components, before converting them. We could technically loosen this -- we don't actually care what Foundation's parser produces; we should just check that we can convert its result safely.

  2. It checks that some questionable behaviour/bugs in Foundation.URL (like unescaped backslashes) don't lead to problems when converted to WebURL.

Since Foundation changed the implementation of URL to use the URLComponents parser, the above tests have been failing.

We're not allowing any dangerous conversions, so the implementation doesn't need to change (it's intentionally robust to Foundation implementation changes), but the tests expect specific behaviour from Foundation's URL parser which now needs to be conditional.

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

No branches or pull requests

1 participant