Skip to content

Commit

Permalink
fix: Requested Changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Abeeujah committed Nov 21, 2024
1 parent 321b70b commit 95dd9c2
Showing 1 changed file with 7 additions and 20 deletions.
27 changes: 7 additions & 20 deletions crates/scarb-api/src/artifacts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,6 @@ fn compile_artifact_at_path(path: &Utf8Path) -> Result<StarknetContractArtifacts

#[cfg(test)]
mod tests {
use std::path::Path;

use super::*;
use crate::ScarbCommand;
use camino::Utf8PathBuf;
Expand Down Expand Up @@ -155,18 +153,14 @@ mod tests {
}

#[test]
#[cfg_attr(not(feature = "scarb_2_8_3"), ignore)]
fn test_load_contracts_artifacts() {
let temp = crate::tests::setup_package("basic_package");

ScarbCommand::new_with_stdio()
.current_dir(temp.path())
.arg("build")
.run()
.unwrap();

ScarbCommand::new_with_stdio()
.current_dir(temp.path())
.arg("test")
.arg("--test")
.run()
.unwrap();

Expand All @@ -175,22 +169,15 @@ mod tests {

// Get the base artifact
let base_file = Utf8PathBuf::from_path_buf(
base_artifacts_path.join("basic_package.starknet_artifacts.json"),
base_artifacts_path.join("basic_package_integrationtest.test.starknet_artifacts.json"),
)
.unwrap();

// Load other artifact files and add them to the temporary directory
let other_files = vec![
Utf8PathBuf::from_path_buf(
base_artifacts_path
.join("basic_package_integrationtest.test.starknet_artifacts.json"),
)
.unwrap(),
Utf8PathBuf::from_path_buf(
base_artifacts_path.join("basic_package_unittest.test.starknet_artifacts.json"),
)
.unwrap(),
];
let other_files = vec![Utf8PathBuf::from_path_buf(
base_artifacts_path.join("basic_package_unittest.test.starknet_artifacts.json"),
)
.unwrap()];

// Create `StarknetArtifactsFiles`
let artifacts_files = StarknetArtifactsFiles::new(base_file, other_files);
Expand Down

0 comments on commit 95dd9c2

Please sign in to comment.