Skip to content

Commit

Permalink
chore: add e2e tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Romsters committed Dec 10, 2024
1 parent 49235bc commit 33af1f0
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions e2e-tests-rust/tests/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use alloy::network::ReceiptResponse;
use alloy::providers::ext::AnvilApi;
use alloy::providers::Provider;
use anvil_zksync_e2e_tests::{
init_testing_provider, AnvilZKsyncApi, ReceiptExt, ZksyncWalletProviderExt, DEFAULT_TX_VALUE,
};
Expand Down Expand Up @@ -333,3 +334,15 @@ async fn cant_load_into_existing_state() -> anyhow::Result<()> {

Ok(())
}

#[tokio::test]
async fn set_chain_id() -> anyhow::Result<()> {
let provider = init_testing_provider(|node| node.block_time(3)).await?;

let new_chain_id = 261;
provider.anvil_set_chain_id(new_chain_id).await?;

assert_eq!(new_chain_id, provider.get_chain_id().await?);

Ok(())
}

0 comments on commit 33af1f0

Please sign in to comment.