Skip to content

Commit

Permalink
Error if URL in <WEBDRIVER>_REMOTE can't be parsed (#4362)
Browse files Browse the repository at this point in the history
  • Loading branch information
daxpedda authored Dec 17, 2024
1 parent c0fd24c commit 292916d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
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

0 comments on commit 292916d

Please sign in to comment.