Skip to content

Commit

Permalink
load_contracts_artifacts test result unwrapped
Browse files Browse the repository at this point in the history
  • Loading branch information
Abeeujah committed Jan 21, 2025
1 parent bef00be commit affa83f
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions crates/scarb-api/src/artifacts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -196,14 +196,10 @@ mod tests {
let artifacts_files = StarknetArtifactsFiles::new(base_file, other_files);

// Load the contracts
let result = artifacts_files.load_contracts_artifacts();

// Ensure no errors and non-empty result
assert!(result.is_ok());
let result = artifacts_files.load_contracts_artifacts().unwrap();

// Assert the Contract Artifacts are loaded.
let artifacts_map = result.unwrap();
assert!(artifacts_map.contains_key("ERC20"));
assert!(artifacts_map.contains_key("HelloStarknet"));
assert!(result.contains_key("ERC20"));
assert!(result.contains_key("HelloStarknet"));
}
}

0 comments on commit affa83f

Please sign in to comment.