Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
harrysolovay committed Oct 3, 2024
1 parent 4677ce1 commit f86e4e4
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 39 deletions.
20 changes: 0 additions & 20 deletions .vscode/launch.json

This file was deleted.

9 changes: 6 additions & 3 deletions tests/block.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,11 @@ fn specified_identifiers() -> &'static [PartialBlockIdentifier; 3] {

#[tokio::test]
async fn unspecified() -> Result<()> {
let mina_mesh = MinaMeshConfig::from_env().to_mina_mesh().await?;
let result = mina_mesh.block_metadata(&PartialBlockIdentifier { hash: None, index: None }).await;
assert!(result.is_ok());
let response = MinaMeshConfig::from_env()
.to_mina_mesh()
.await?
.block_metadata(&PartialBlockIdentifier { hash: None, index: None })
.await;
assert!(response.is_ok());
Ok(())
}
12 changes: 2 additions & 10 deletions tests/network_list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,7 @@ use mina_mesh::MinaMeshConfig;

#[tokio::test]
async fn mainnet_test() -> Result<()> {
// Create a MinaMesh instance using the default configuration
let mina_mesh = MinaMeshConfig::from_env().to_mina_mesh().await?;

// Call the network_list function
let result = mina_mesh.network_list().await?;

assert!(!result.network_identifiers.is_empty());

let network_identifier = &result.network_identifiers[0];
assert_debug_snapshot!(network_identifier);
let response = MinaMeshConfig::from_env().to_mina_mesh().await?.network_list().await?;
assert_debug_snapshot!(&response.network_identifiers);
Ok(())
}
14 changes: 8 additions & 6 deletions tests/snapshots/network_list__mainnet_test.snap
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
---
source: tests/network_list.rs
expression: network_identifier
expression: "&response.network_identifiers"
---
NetworkIdentifier {
blockchain: "mina",
network: "mainnet",
sub_network_identifier: None,
}
[
NetworkIdentifier {
blockchain: "mina",
network: "mainnet",
sub_network_identifier: None,
},
]

0 comments on commit f86e4e4

Please sign in to comment.