mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-22 18:28:01 +00:00
15ffbb6c4b
* fix(ci): wasm tests with cache * disable logging in wasm tests
20 lines
529 B
Rust
20 lines
529 B
Rust
#![cfg(target_arch = "wasm32")]
|
|
|
|
use subxt::config::PolkadotConfig;
|
|
use wasm_bindgen_test::*;
|
|
|
|
wasm_bindgen_test::wasm_bindgen_test_configure!(run_in_browser);
|
|
|
|
/// Run the tests by `$ wasm-pack test --firefox --headless`
|
|
|
|
#[wasm_bindgen_test]
|
|
async fn wasm_ws_transport_works() {
|
|
let client =
|
|
subxt::client::OnlineClient::<PolkadotConfig>::from_url("ws://127.0.0.1:9944")
|
|
.await
|
|
.unwrap();
|
|
|
|
let chain = client.rpc().system_chain().await.unwrap();
|
|
assert_eq!(&chain, "Development");
|
|
}
|