mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-23 07:18:00 +00:00
464b4432cf
* Move all deps to workspace toml * cargo fmt and codec 3.4, removing now unneeded 'full' feature * add wasm-tests to workspace and fix subxt inheritng * cargo fmt * wasm-test thing can't be in workspace so revert that * remove unwanted target dir from wasm-tests
19 lines
513 B
Rust
19 lines
513 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");
|
|
}
|