Conversation
Test262 conformance changes
Broken tests (3):Tested main commit: |
|
@jedel1043 can you please review this |
|
@jedel1043 updated this. searchParams is now created during URL construction and the getter just returns the same object. |
| #[derive(Debug, Clone)] | ||
| struct OptionalArg(Option<JsValue>); | ||
|
|
||
| impl<'a> TryFromJsArgument<'a> for OptionalArg { | ||
| fn try_from_js_argument( | ||
| _: &'a JsValue, | ||
| rest: &'a [JsValue], | ||
| _: &mut Context, | ||
| ) -> JsResult<(Self, &'a [JsValue])> { | ||
| match rest.split_first() { | ||
| Some((first, rest)) => Ok((Self(Some(first.clone())), rest)), | ||
| None => Ok((Self(None), rest)), | ||
| } | ||
| } | ||
| } |
There was a problem hiding this comment.
Wondering about this implementation. Was Option<JsValue> not enough for this? It will additionally automatically map undefined to None, so if that's the correct behaviour it would be better to use Option
|
give me 5 mins I'll clutch this :)) |
|
also fixed the clippy failure from the missing errors docs on the Rust side URL constructors |
| done: bool, | ||
| } | ||
|
|
||
| impl UrlSearchParamsIterator { |
There was a problem hiding this comment.
This could also be a class IMO
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #5040 +/- ##
===========================================
+ Coverage 47.24% 59.37% +12.12%
===========================================
Files 476 563 +87
Lines 46892 63095 +16203
===========================================
+ Hits 22154 37462 +15308
- Misses 24738 25633 +895 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Fixes #4743.
Adds
URLSearchParamsand wires upURL.searchParams.This also fixes the constructor path for iterable inputs, handles explicit
undefinedcorrectly in the two-argumenthas()anddelete()overloads, adds runtime coverage, and re-enables the skipped URL WPT case.Tests:
cargo test -p boa_runtime --libcargo test --manifest-path tests/wpt/Cargo.toml url -- --nocapturecargo clippy -p boa_runtime --all-features --all-targets -- -D warnings