mirror of
https://github.com/tlsnotary/wasm-bindgen.git
synced 2026-01-09 15:08:01 -05:00
Allow overriding headless test URL (#3861)
This commit is contained in:
@@ -17,6 +17,9 @@
|
||||
* Add support for `Option<*const T>`, `Option<*mut T>` and `NonNull<T>`.
|
||||
[#3852](https://github.com/rustwasm/wasm-bindgen/pull/3852)
|
||||
|
||||
* Allow overriding the URL used for headless tests by setting `WASM_BINDGEN_TEST_ADDRESS`.
|
||||
[#3861](https://github.com/rustwasm/wasm-bindgen/pull/3861)
|
||||
|
||||
### Changed
|
||||
|
||||
* Allow using `'static` lifetimes in functions marked with `#[wasm_bindgen]`. This does not allow references where they were not allowed before!
|
||||
|
||||
@@ -121,7 +121,8 @@ pub fn run(server: &SocketAddr, shell: &Shell, timeout: u64) -> Result<(), Error
|
||||
|
||||
// Visit our local server to open up the page that runs tests, and then get
|
||||
// some handles to objects on the page which we'll be scraping output from.
|
||||
let url = format!("http://{}", server);
|
||||
let url =
|
||||
std::env::var("WASM_BINDGEN_TEST_ADDRESS").unwrap_or_else(|_| format!("http://{}", server));
|
||||
shell.status(&format!("Visiting {}...", url));
|
||||
client.goto(&id, &url)?;
|
||||
shell.status("Loading page elements...");
|
||||
|
||||
Reference in New Issue
Block a user