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

Error if URL in <WEBDRIVER>_REMOTE can't be parsed #4362

Merged
merged 1 commit into from
Dec 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@
* Align test output closer to native `cargo test`.
[#4358](https://github.com/rustwasm/wasm-bindgen/pull/4358)

* Error if URL in `<WEBDRIVER>_REMOTE` can't be parsed instead of just ignoring it.
[#4362](https://github.com/rustwasm/wasm-bindgen/pull/4362)

### Fixed

- Fixed using [JavaScript keyword](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Lexical_grammar#keywords) as identifiers not being handled correctly.
Expand All @@ -49,6 +52,9 @@
* Use OS provided temporary directory for tests instead of Cargo's `target` directory.
[#4361](https://github.com/rustwasm/wasm-bindgen/pull/4361)

* Error if URL in `<WEBDRIVER>_REMOTE` can't be parsed.
[#4362](https://github.com/rustwasm/wasm-bindgen/pull/4362)

--------------------------------------------------------------------------------

## [0.2.99](https://github.com/rustwasm/wasm-bindgen/compare/0.2.98...0.2.99)
Expand Down
5 changes: 1 addition & 4 deletions crates/cli/src/bin/wasm-bindgen-test-runner/headless.rs
Original file line number Diff line number Diff line change
Expand Up @@ -269,10 +269,7 @@ impl Driver {
for (driver, ctor) in drivers.iter() {
let env = format!("{}_REMOTE", driver.to_uppercase());
let url = match env::var(&env) {
Ok(var) => match Url::parse(&var) {
Ok(url) => url,
Err(_) => continue,
},
Ok(var) => Url::parse(&var).context(format!("failed to parse `{env}`"))?,
Err(_) => continue,
};
return Ok(ctor(Locate::Remote(url)));
Expand Down
Loading